Alex Young wrote: > What would be broken if, hypothetically, the mutex behaviour were > changed not to block if the current thread already holds the lock? Would > any possible implementation introduce a race condition? I'm just learning multi-threading with Ruby, don't like what I see, anyways Ruby doesn't support re-entrance with Mutex, it should but doesn't. There would be no adverse effect regrading re-entrance. A thread that owns the mutex should never be blocked, because its thread safe. Other threads would behave just like they do now, they would block on the mutex until it was released by the owning thread. There would be no racing condition, since the code is thread safe. > -- > Alex -- Kind Regards, Rajinder Yadav http://DevMentor.org Do Good ~ Share Freely