Modern Concurrency Practices in Ruby
summary
Shows concrete tradeoffs and working code: mutexes cause deadlocks and lost increments on JRuby but wrapping the counter in the Atomic gem yields 2,000 increments reliably; futures via Celluloid run a sleep-3s web-call example that returns 500 without blocking; an actor tennis demo (Federer vs Rafa) runs as separate processes; STM-style transfers attempt 25 moves but validators force only 11 commits; channels/CSP via core.async and map/parking go blocks scale to thousands of operations; recommends concurrent-ruby for agents and practical fallbacks.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 0:52Agenda
- 2:15What is concurrency
- 3:29Mutexes
- 6:31Atoms
- 7:57Atomic
- 14:42Actors
- 23:10Agents
- 25:41STM
- 29:40Channels CSP
- 33:47Closing Thoughts
related talks
39mConcurrent Systems in Ruby
54mConcurrency: Rubies, plural
28mConcurrency for Rubyists
30mAdvanced Multithreading in Ruby
38mModeling concurrency in Ruby and beyond
37mLetting Concurrency Help You Today
38mScaling Ruby with Actors, or How I Learned to Stop Worrying and Love Threads
27mIn-Depth Ruby Concurrency: Navigating the Ruby concurrency landscape
