From: Joel VanderWerf Date: 2014-04-17T11:57:39-07:00 Subject: [ruby-core:62080] Re: [ruby-trunk - Bug #9754] [Open] Ruby refuses to run source with Mutex locks though there is no hazard.. On 04/17/2014 03:48 AM, thomas.lynch@reasoningtechnology.com wrote: > Bug #9754: Ruby refuses to run source with Mutex locks though there is no hazard.. A Mutex is not reentrant. This deadlocks: m = Mutex.new m.lock m.synchronize {} So does this: m = Mutex.new m.synchronize {m.synchronize {}} But Monitor is reentrant, so the following does not deadlock: m = Monitor.new m.synchronize {m.synchronize {}} There is no Monitor#lock, but there is MonitorMixin::ConditionVariable, which will do what you want. (Btw, ruby-talk might be better for these questions than the forum.)