~/talk

Fiber in the 10th year

Talkat RubyKaigi 2017 · 2017-09-18..09-20· [ruby, concurrency]
slides:none on file

Fiber exists in Ruby 1.9 as a coroutine primitive, used for generators and cooperative schedulers, and the talk lays out concrete implementation steps: initial stack-copy context switching, then using OS primitives like makecontext/swapcontext and Windows Fiber APIs, and finally a pointer-exchange refactor that consolidates fiber state. Measured wins include up to 18x speedup on deep stacks from the OS-primitive approach, about 5% faster on 60k resume/yield iterations after consolidation, and ~30% reduction in some per-fiber metadata. The auto-Fiber proposal makes IO implicitly yield to a global scheduler (no source changes needed) but requires added synchronization and risks hard-to-reproduce bugs.

AI-written summary · about

  1. 0:00Introduction
  2. 1:32What are fibers
  3. 6:57Fiber use cases
  4. 14:10History of fibers
  5. 22:12Fiber implementation
  6. 30:13Auto fiber proposal
  7. 34:40Summary and Q&A
~/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.