On Sat, 12 May 2007 01:47:25 +0900, "Bill Kelly" <billk / cts.com> wrote:
> Also, you might want to try installing the fastthread gem, which is a C
> implementation of thread.rb, just to see if the behavior you're seeing
> changes at all.  (Change require 'thread' to require 'fastthread'...)
> http://rubyforge.org/frs/?group_id=1306&release_id=10507

It's actually best to require both thread and fastthread, catching the LoadError in the second case if fastthread is not installed (not all Ruby versions support or need fastthread).

It's also important to note that if you're using Ruby 1.8.6, fastthread fixes some bugs in the built-in mutex which could be responsible for the problems the OP was seeing.

-mental