Concurrency Showdown: Threads vs. Fibers
summary
Claims Ruby 3.0 rewrites fiber scheduling and optimizes GVL handling, shows fiber scheduler plus explicit fiber.yield/resume control for non‑blocking I/O, and combines fibers for network fetches with threads for CPU‑bound image transforms to get real speedups; demo builds an image‑processing service that uses async, async‑http, async‑io, Falcon and shows the hybrid approach works in practice while noting fibers lack native parallelism and GVL still limits pure threaded CPU scaling.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 2:08Concurrency vs parallelism
- 3:37Threads old-school model
- 5:25Fibers lightweight alternative
- 7:31Race conditions: threads vs fibers
- 10:00Deadlocks and handling
- 12:46Interrupts management
- 14:30Limitations of threads and fibers
- 17:47Threads and fibers combined
- 19:09Justice League approach
- 20:55Closing thoughts
related talks
20mSubprocesses, Threads and Fibers
35mConcurrency in Ruby: Threads, Fibers and Ractors Demystified
26mConcurrency in Ruby: From fork() to Fiber
40mFiber in the 10th year
33mAsynchronous Rails
23mParallel Processing With Ruby
42mHow to write synchronization mechanisms for Fiber
27mIn-Depth Ruby Concurrency: Navigating the Ruby concurrency landscape
