~/talk

How do Fibers Work? A Peek Under the Hood

Talkat Scala World 2019 · 2019-09-11..09-13· [concurrency]
slides:none on file

Explains an IO runtime implemented as a data type (pure, delay, flatMap) plus a single interpreter loop using an untyped call-stack of continuations, with async nodes implemented as callbacks and cooperative scheduling via JVM ExecutionContext and ScheduledExecutorService. Shows fibers as lightweight call‑stacks that yield by submitting the remaining callback to the thread pool, so many fibers run on a fixed small set of JVM threads non‑blocking. Demonstrates with an fs2-like server emitting pings 0..10 once per second and graceful shutdown after ten minutes.

AI-written summary · about

  1. 0:00Fibers introduction
  2. 4:22Synchrony vs concurrency
  3. 15:41Concurrency on JVM/OS
  4. 24:52IO as data type
  5. 31:28Error handling in IO
  6. 40:20Async with continuations
  7. 48:53Fibers from threads/callbacks
  8. 53:13Fiber operations
  9. 58:11Why fibers simplify
~/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.