~/talk

Kotlin Coroutines: Design and Implementation

Talkat Onward! 2021 · 2021-10-20..10-22· [kotlin, concurrency]
links:none on file
links:none on file
links:none on file
slides:none on file

Kotlin implements asymmetrical, stackless coroutines that compile suspend functions into continuations and state machines, returning COROUTINE_SUSPENDED at suspension points. The runtime exposes three low-level intrinsics (createCoroutineUnintercepted, startCoroutineUninterceptedOrReturn, suspendCoroutineUninterceptedOrReturn) plus interceptor-based dispatch so coroutines run on event loops, executors, or thread pools. Adapters convert callbacks, CompletableFuture-style promises and channels; generators are built on coroutines. Structured concurrency is supported to cancel sibling children on failure.

AI-written summary · about

  1. 0:00Kotlin Coroutines: Design and implementation
  2. 0:55The story so far: callbacks
  3. 1:40The story so far: active/pipelined promises
  4. 2:26The story so far: async/await
  5. 3:05Honourable mention: green threads/fibers
  6. 3:36The story so far: coroutines
  7. 4:43Coroutine problems
  8. 5:45Kotlin coroutines: goals
  9. 6:40Kotlin coroutines: classification
  10. 7:03async/await family, but with a twist
  11. 7:41Gory implementation details
  12. 7:55The complete low-level API
  13. 8:22Compiling functions to continuations
  14. 9:03Interception
  15. 9:29Design evaluation
  16. 9:55The flexibility goal: different styles of computations
  17. 10:23The flexibility goal: generators
  18. 10:49Known limitations and future work
  19. 11:04Summing up
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.