Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Mutex behavior mismatch with MRI since JRuby 184.108.40.206 #5875
The following executes "forever" without errors on MRI 2.5.3 and JRuby 220.127.116.11:
mutex = Mutex.new t1 = Thread.new do loop do mutex.synchronize do mutex.sleep 1 # not needed to provoke the error, but just to motivate the t1.run below end end end loop do mutex.synchronize do end t1.run end
After some digging around I would assume this is connected to the change in #5683. What I find a bit curious is that the main thread must also try to synchronize to force the error to happen.