Parallel Processing With Ruby
summary
Compares Ruby MRI (GIL/green threads) with JRuby (native parallel threads), demonstrates a real array.push race where five threads should append 5,000 items but concurrent implementations can lose updates, shows that mutex.synchronize fixes it, and explains fibers, the celluloid actor model and why Sidekiq moved away from Celluloid. Mentions a Ruby 3 “Guild” proposal to allow multiple guilds (threads groups) and a claimed ~3x speed target versus Ruby 2.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 3:15Parallel Processing vs Concurrency
- 14:04Are You Safe With Ruby
- 14:39Use Mutex
- 16:13Guild Implementation
- 18:03Fiber
- 18:34Celluloid
- 20:13Questions
related talks
28mConcurrency for Rubyists
33mConcurrency for !Dummies (Who Don't Get It (...Yet))
20mSubprocesses, Threads and Fibers
33mDear God What Am I Doing? Concurrency and Parallel Processing
38mScaling Ruby with Actors, or How I Learned to Stop Worrying and Love Threads
39mConcurrent Systems in Ruby
42mLook out! Gotchas of Using Threads in Ruby
54mConcurrency: Rubies, plural
