Take the 2-minute tour ×

Can anyone recommend any good multithreading / processing books / sites which go into detail about the intricacies of Ruby multithreading / multiprocessing?

I tried using ruby threading and basically in deadlock-free code on 1.9vm it ran into deadlocks in jruby. Yes I realize the differences are drastic (jruby has no GIL) but I wanted to know if there are strategies or set of classes for multithreaded programming in ruby that I just need to read up on.

Side note: was kinda weird going from java to ruby having to define if i want a re-enterent lock vs not.

share|improve this question
Related to stackoverflow.com/questions/999482/… –  clyfe Mar 6 '10 at 10:20
igvita.com/2008/11/13/concurrency-is-a-myth-in-ruby is good, but wouldn't explain why jruby is different. –  rogerdpack Dec 31 '11 at 17:51
add comment

2 Answers

up vote 1 down vote accepted

If you use Ruby 1.9 you can try Fiber it's a big improvement in threading in Ruby



share|improve this answer
I wouldn't call it an improvement, just a different feature used to accomplish similar tasks. A big improvement is threading in JRuby's implementation. –  clyfe Mar 6 '10 at 10:19
add comment

Surprisingly, the dRuby book has a chapter about DRb multithreading, and it touches some basic aspects of Ruby Multithreading. It was written by the same man who wrote dRuby/ERB, and looks pretty good.

share|improve this answer
add comment

Your Answer


