How Channels Work in Kotlin Coroutines
summary
Explains how coroutine channels work as a concurrency primitive that lets one coroutine send and another receive elements, with optional synchronization so senders and receivers can wait for each other. Compares channel implementations across languages and libraries, describes the algorithm Kotlin uses to implement channels, and contrasts Kotlin’s approach with Go.
AI-written summary · about
chapters (22)
- 0:00Coroutines introduction
- 1:06Why channels
- 3:14Coroutines vs threads
- 4:16Toy channel problem
- 6:43Rendezvous channels
- 9:10Channel basics
- 11:21Go channels comparison
- 13:35Atomic counters
- 18:1464-bit counter issues
- 21:52Storing rendezvous cells
- 24:45Benchmarking channels
- 29:09Buffered channels
- 34:34Performance vs Go
- 37:13Cancelling tasks
- 39:40Select operator
- 41:45Non-blocking select
- 46:16Select implementation
- 48:48Multiple selects
- 51:00Cancellation in coroutines
- 53:17Other synchronization
- 55:26Select performance
- 56:55Q&A
