It attempts to explain various use-cases around coroutines in simple terms to explain them.
- concurrency: run multiple coroutines concurrently
- yield: using
yield()
to yield dispatcher to other coroutines - default dispatcher: using
Dispatchers.Default
to run coroutines in parallel - Thread pool: using a fixed Thread pool for coroutines
- async:
async()
andawait()
- launch and exceptions: how to handle exceptions in coroutines
- async and exceptions: exceptions in
async()
coroutines - produce: how to produce values and use
ReceiveChannel
- actors: how to use actors in Kotlin
- flow: uing
Flow
to build sequential streams of events