How to write synchronization mechanisms for Fiber
summary
Presents a concrete Fiber idiom and a tiny event library that combines a select abstraction with Fiber resume to get blocking‑style non‑blocking IO; implements a rendezvous queue for Fiber synchronization (no mutexes needed) and a proof‑of‑concept single‑threaded HTTP server running WEBrick on one thread. Provides actual code for timer jobs and TCP accept/read loops, shows it works but warns about hazards: blocking library calls (JSON parse, drivers) freeze all Fibers and require careful boundaries.
AI-written summary · about
chapters (6)
- 0:00Introduction and context
- 7:24Fiber fundamentals explained
- 13:01Synchronization with fibers
- 21:07Socket server programming with fibers
- 29:15Summary and key takeaways
- 33:26Q&A session
related talks
01h 00mHow do Fibers Work? A Peek Under the Hood
55mElegant Asynchronous Code
23mConcurrency Showdown: Threads vs. Fibers
20mSubprocesses, Threads and Fibers
49mFIBER SUPERVISION IN ZIO
39mUnlock Parallel Processing in PHP with Fibers
36mConcurrency with Cats-effect
26mConcurrency in Ruby: From fork() to Fiber
