Modeling concurrency in Ruby and beyond
summary
Argues that Ruby needs actor/CSP-style concurrency and shows a working Ruby prototype: the agent gem implements Go-like channels and a go keyword, with channels typed and configurable buffer size. Demonstrates a producer/consumer and a worker-pool example with two workers, channel buffer 2, each worker sleeping 1s and returning incremented results — both workers run concurrently without explicit locks. Notes MRI’s GIL limits multi-core gains, recommends experimenting on JRuby/Rubinius/MacRuby, and claims this model is simpler and safer than raw threads.
AI-written summary · about
chapters (7)
- 0:00Start
- 0:09Lead Media Partners
- 2:13Hardware Parallelism
- 6:25The "concurrency API"
- 11:32The history: actor model
- 15:30The history: CSP model
- 19:38Producer/Consumer








