On Nov 6, 2006, at 5:57 AM, MenTaLguY wrote:

> Many people have been using Thread.critical for locking because Ruby
> 1.8's Mutex is relatively slow.  Since 1.9 will not have
> Thread.critical, I think it would be good to optimize Mutex in 1.8 so
> people can become accustomed to using it today.
>
> Is someone already working on a faster Mutex for 1.8?  If not, I'd be
> interested in doing so.

As has been discussed further down in this thread, there isn't much  
to do to make Mutex faster.  The only remaining thing is to avoid  
Mutex#synchronize when you need to be really fast.  The block  
invocation overhead huge.  Instead use #lock, #unlock and ensure.

-- 
Eric Hodel - drbrain / segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com