The main coroutines guide has moved to the [docs folder](docs/coroutines-guide.md) and split up into smaller documents. ## Table of contents * [Coroutine basics](docs/basics.md#coroutine-basics) * [Your first coroutine](docs/basics.md#your-first-coroutine) * [Bridging blocking and non-blocking worlds](docs/basics.md#bridging-blocking-and-non-blocking-worlds) * [Waiting for a job](docs/basics.md#waiting-for-a-job) * [Structured concurrency](docs/basics.md#structured-concurrency) * [Scope builder](docs/basics.md#scope-builder) * [Extract function refactoring](docs/basics.md#extract-function-refactoring) * [Coroutines ARE light-weight](docs/basics.md#coroutines-are-light-weight) * [Global coroutines are like daemon threads](docs/basics.md#global-coroutines-are-like-daemon-threads) * [Cancellation and timeouts](docs/cancellation-and-timeouts.md#cancellation-and-timeouts) * [Cancelling coroutine execution](docs/cancellation-and-timeouts.md#cancelling-coroutine-execution) * [Cancellation is cooperative](docs/cancellation-and-timeouts.md#cancellation-is-cooperative) * [Making computation code cancellable](docs/cancellation-and-timeouts.md#making-computation-code-cancellable) * [Closing resources with `finally`](docs/cancellation-and-timeouts.md#closing-resources-with-finally) * [Run non-cancellable block](docs/cancellation-and-timeouts.md#run-non-cancellable-block) * [Timeout](docs/cancellation-and-timeouts.md#timeout) * [Composing suspending functions](docs/composing-suspending-functions.md#composing-suspending-functions) * [Sequential by default](docs/composing-suspending-functions.md#sequential-by-default) * [Concurrent using async](docs/composing-suspending-functions.md#concurrent-using-async) * [Lazily started async](docs/composing-suspending-functions.md#lazily-started-async) * [Async-style functions](docs/composing-suspending-functions.md#async-style-functions) * [Structured concurrency with async](docs/composing-suspending-functions.md#structured-concurrency-with-async) * [Coroutine context and dispatchers](docs/coroutine-context-and-dispatchers.md#coroutine-context-and-dispatchers) * [Dispatchers and threads](docs/coroutine-context-and-dispatchers.md#dispatchers-and-threads) * [Unconfined vs confined dispatcher](docs/coroutine-context-and-dispatchers.md#unconfined-vs-confined-dispatcher) * [Debugging coroutines and threads](docs/coroutine-context-and-dispatchers.md#debugging-coroutines-and-threads) * [Jumping between threads](docs/coroutine-context-and-dispatchers.md#jumping-between-threads) * [Job in the context](docs/coroutine-context-and-dispatchers.md#job-in-the-context) * [Children of a coroutine](docs/coroutine-context-and-dispatchers.md#children-of-a-coroutine) * [Parental responsibilities](docs/coroutine-context-and-dispatchers.md#parental-responsibilities) * [Naming coroutines for debugging](docs/coroutine-context-and-dispatchers.md#naming-coroutines-for-debugging) * [Combining context elements](docs/coroutine-context-and-dispatchers.md#combining-context-elements) * [Coroutine scope](docs/coroutine-context-and-dispatchers.md#coroutine-scope) * [Thread-local data](docs/coroutine-context-and-dispatchers.md#thread-local-data) * [Exception handling](docs/exception-handling.md#exception-handling) * [Exception propagation](docs/exception-handling.md#exception-propagation) * [CoroutineExceptionHandler](docs/exception-handling.md#coroutineexceptionhandler) * [Cancellation and exceptions](docs/exception-handling.md#cancellation-and-exceptions) * [Exceptions aggregation](docs/exception-handling.md#exceptions-aggregation) * [Supervision](docs/exception-handling.md#supervision) * [Supervision job](docs/exception-handling.md#supervision-job) * [Supervision scope](docs/exception-handling.md#supervision-scope) * [Exceptions in supervised coroutines](docs/exception-handling.md#exceptions-in-supervised-coroutines) * [Channels (experimental)](docs/channels.md#channels-experimental) * [Channel basics](docs/channels.md#channel-basics) * [Closing and iteration over channels](docs/channels.md#closing-and-iteration-over-channels) * [Building channel producers](docs/channels.md#building-channel-producers) * [Pipelines](docs/channels.md#pipelines) * [Prime numbers with pipeline](docs/channels.md#prime-numbers-with-pipeline) * [Fan-out](docs/channels.md#fan-out) * [Fan-in](docs/channels.md#fan-in) * [Buffered channels](docs/channels.md#buffered-channels) * [Channels are fair](docs/channels.md#channels-are-fair) * [Ticker channels](docs/channels.md#ticker-channels) * [Shared mutable state and concurrency](docs/shared-mutable-state-and-concurrency.md#shared-mutable-state-and-concurrency) * [The problem](docs/shared-mutable-state-and-concurrency.md#the-problem) * [Volatiles are of no help](docs/shared-mutable-state-and-concurrency.md#volatiles-are-of-no-help) * [Thread-safe data structures](docs/shared-mutable-state-and-concurrency.md#thread-safe-data-structures) * [Thread confinement fine-grained](docs/shared-mutable-state-and-concurrency.md#thread-confinement-fine-grained) * [Thread confinement coarse-grained](docs/shared-mutable-state-and-concurrency.md#thread-confinement-coarse-grained) * [Mutual exclusion](docs/shared-mutable-state-and-concurrency.md#mutual-exclusion) * [Actors](docs/shared-mutable-state-and-concurrency.md#actors) * [Select expression (experimental)](docs/select-expression.md#select-expression-experimental) * [Selecting from channels](docs/select-expression.md#selecting-from-channels) * [Selecting on close](docs/select-expression.md#selecting-on-close) * [Selecting to send](docs/select-expression.md#selecting-to-send) * [Selecting deferred values](docs/select-expression.md#selecting-deferred-values) * [Switch over a channel of deferred values](docs/select-expression.md#switch-over-a-channel-of-deferred-values)