Just wanted to echo something I sent via email, but Tim’s right Ruby threads are weak, in fact I’d call them a toy. Key problems:
- slow as hell, threads tend to die unexpectedly
- documentation and sample code limited to a handful of pages in the Pickaxe (lack of people using should have been clue #1)
- non-OO (in Ruby! an int in Ruby is an object!), all examples use code blocks, subclassing Thread can have unexpected (to me, with my Java threading biases) results
- many core libraries, and more painfully (in that I lost several weeks of my life, and some hair) ActiveRecord aren’t thread safe.
All from my experience of trying of writing a threaded RSS poller for Odeo that reused the model objects from the webapp. In short, fork() is your friend.