Subprocesses, Threads and Fibers
summary
Compares three concurrency mechanisms with runnable examples: a "stupidest web client" implemented with threads showing thread.join blocks and silent exceptions; the same client forked to show child/parent behavior, pipes for IPC and the impact of copy-on-write plus GC defeating CoW on REE versus Ruby 2.0's bitmap marking; and a fiber-based client demonstrating fiber.yield/resume, inter-fiber transfer and the 4k stack limit. Claims: MRI 1.9 GIL means no parallelism, JRuby/Rubinius/Truffleruby allow parallelism, mixes (forks+fibers or threads+fibers) recommended per runtime.
AI-written summary · about
chapters (5)
- 0:00Introduction to concurrency
- 3:49Threads in Ruby
- 8:25Process forks in Ruby
- 13:03Fibers in Ruby
- 18:56Choosing concurrency model
related talks
54mConcurrency: Rubies, plural
23mParallel Processing With Ruby
35mConcurrency in Ruby: Threads, Fibers and Ractors Demystified
23mConcurrency Showdown: Threads vs. Fibers
26mConcurrency in Ruby: From fork() to Fiber
28mConcurrency for Rubyists
39mConcurrent Systems in Ruby
36mIntroduction to Concurrency in Ruby
