Patches item #8168, was opened at 2007-01-25 23:03
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1700&aid=8168&group_id=426

Category: Ruby1.8
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: MenTaL guY (mental)
Assigned to: Nobody (None)
Summary: improved C implementation of thread.rb ("fastthread")

Initial Comment:
Without an efficient Mutex and ConditionVariable, people cannot easily write synchronization code which runs efficiently on both 1.8 and newer Rubies.

The attached patch reimplements the thread.rb classes Mutex, ConditionVariable, Queue and SizedQueue in C, making Mutex as efficient to use as Thread.critical in the single-threaded case while retaining its advantages when multiple threads are present.  As a side effect, it also improves memory usage relative to the existing implementation.

This code is already widely used via the "fastthread" gem (a dependency of Mongrel) and has been well-tested as a result.  It should be 100% compatible with thread.rb's existing public API, although code attempting to directly manipulate instance variables of these classes will obviously break.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1700&aid=8168&group_id=426