Optimized replacement for thread.rb primitives

WWW: http://mongrel.rubyforge.org/
