// the find
Kotlin/kotlinx.coroutines
Library support for Kotlin coroutines
The reference coroutines library for Kotlin, built and maintained by JetBrains. Gives you structured concurrency (launch/async/Job hierarchies), Flow for cold async streams, channels, and dispatchers across JVM, Android, JS, Native, and Wasm. For any Kotlin developer doing async work — this is the default, not an alternative to evaluate.
Structured concurrency is enforced by the API shape, not just convention — a parent Job can't complete until its children do, and cancellation propagates down the hierarchy automatically. Flow's operator set (map, filter, flatMapMerge, combine, etc.) covers most real use cases without reaching for a third-party reactive library. Genuinely multiplatform — the same coroutine code targets JVM, JS, Wasm, and Native, not just a JVM library with bindings bolted on. DebugProbes and the BlockHound integration give you actual visibility into coroutine state and accidental blocking calls, which most concurrency libraries don't bother with.
Cancellation is cooperative — a tight loop or a call into non-suspending blocking code won't observe cancellation unless you explicitly check isActive or insert a suspension point, and that failure mode is silent until you hit it in production. Exception propagation differs meaningfully between coroutineScope, supervisorScope, and a bare SupervisorJob, and the rules aren't discoverable from the type signatures — you have to have read the docs or gotten burned once. Stack traces across suspension points are historically hard to read without enabling DebugProbes (a runtime cost most people don't turn on by default). The API surface is large enough — core, test, debug, reactive, integration, ui modules — that picking which artifacts you actually need takes real effort for newcomers.