~/talk

Coroutines explained by example

Talkat GeeCON 2019 · 2019-05-15..05-17· [concurrency]
slides:none on file

Coroutines appear as concrete, runnable examples in Lua, JavaScript, Scheme showing yield, generators and async/await mapped to the same idea: suspend and resume with saved local state. The talk demos a 2s dog then 5s pig promise chain (total expected 5s when composed), shows Babel and compiler output that lower-level code becomes a state-machine transformation, and presents a call/cc-based implementation that reconstructs yield/resume semantics and compares performance: coroutines are cheaper than OS threads for high concurrency.

AI-written summary · about

  1. 0:00Introduction to coroutines
  2. 2:22Why use coroutines
  3. 3:26Coroutines as threads
  4. 10:31Generators in JavaScript
  5. 17:34Async/await explained
  6. 22:22Call/CC in Scheme
  7. 28:47Callback hell vs coroutines
  8. 33:30Promises vs coroutines
  9. 36:46When to use coroutines
  10. 38:54Q&A and summary
~/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.