Coroutine Puzzlers
summary
Interactive live quiz shows 20+ Kotlin coroutine puzzles with runnable code: exact outputs for launch vs coroutineScope, delay is suspend so tasks overlap — two async delays take ~1s not 2s, cancel vs cancelAndJoin behavior, supervisorJob vs Job and supervisorScope isolates failures, withTimeout throwing TimeoutCancellationException, sleep vs delay making work blocking, race condition on counter increments across two threads (fails until properly synchronized) and finally a corrected run that produces 1,000,000 increments.
AI-written summary · about
chapters (20)
- 0:00Welcome
- 1:08Setting up the interactive quiz
- 2:19First puzzle
- 3:53Coroutine scopes
- 6:02Cancellation and join
- 7:55Supervisor cancellation
- 10:54Exception handling
- 13:13Prevent propagation
- 15:01Supervisor scope vs job
- 18:39Parent job isolation
- 20:59Timeout handling
- 22:26Async timing
- 25:00Join all timing
- 27:56Delays and interruption
- 29:23Sleep delays
- 30:50Heavy computation
- 32:41Race conditions
- 35:54Synchronization limits
- 37:46Proper synchronization
- 40:10Final puzzle








