This repo contains the slide deck and sample code from my presentation at RubyConf 2015.
The video is available online at Confreaks.
When a Rubyist hears "concurrency" they usually Google Elixir, Go, or even Node.js. Turns out, Ruby can be great for concurrency! The Global Interpreter Lock (GIL) does NOT prevent Ruby programs from performing concurrently. In this presentation we'll discuss the true meaning of concurrency, explore the inner-workings of the GIL, and gain a deeper understanding of how the GIL effects concurrent programs. Along the way we'll write a bunch of concurrent Ruby code, run it on multiple interpreters, and compare the results.
- The video is available online at Confreaks.
- The slide deck is also available online
- Source repository for concurrent-ruby
- Sample code shown during the presentation:
- concurrency-test-network.rb demonstrates the significant performance gain MRI Ruby is capable of when performing multi-threaded I/O operations
- shared-memory-example.rb is an example of the safety and correctness problems associated with shared memory concurrency
- thread-safety-example.rb is another example of thread safety and correctness issues
- The slide deck from Rob Pike's "Concurrency is not Parallelism" presentation