Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby multithreading / multiprocessing readings

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.

like image 945
Dmitriy Likhten Avatar asked Mar 05 '10 22:03

Dmitriy Likhten


1 Answers

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

http://ruby-doc.org/core-1.9/classes/Fiber.html

http://www.infoq.com/news/2007/08/ruby-1-9-fibers

like image 162
shingara Avatar answered Oct 25 '22 01:10

shingara