Summary of "Kotlin Coroutine (High-quality Course)"

Course overview (Kotlin Coroutines)


Chapter 1: Fundamentals + threading vs coroutines

Problem with threads on the main thread

Why coroutines

First Kotlin project setup

Key runtime behaviors: Thread vs Coroutine

First coroutine demo

Blocking vs non-blocking delay

suspend and suspending function rules

launch vs runBlocking (demonstrated)

How to write and structure code

Creating custom suspending functions


Chapter 2: Coroutine builders, scope, and Job/Deferred

Coroutine builders (main ones)

What “coroutine builders” are

GlobalScope vs local scope

launch: Job control

async: Deferred results

runBlocking: practical use for tests

Non-blocking vs blocking summary


Chapter 3: Cancellation, cooperative cancellation, exceptions, timeouts

Why cancel coroutines

Cancellation is cooperative

Cooperative cancellation approach #1: cancellable suspending functions

Cooperative cancellation approach #2: manual checks

Cancellation APIs

Handling CancellationException

Custom cancellation messages

Timeouts


Chapter 4: Composing suspending functions (sequential, concurrent, lazy)

Default is sequential

Make it concurrent

Lazy start optimization


Chapter 5: CoroutineScope, CoroutineContext, Dispatchers (threading model)

CoroutineScope

CoroutineContext

Dispatcher behavior (thread confinement vs not)

Dispatcher types mentioned


Main speakers / sources

Category ?

Technology


Share this summary


Is the summary off?

If you think the summary is inaccurate, you can reprocess it with the latest model.

Video