You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lock#wait releases lock when going to sleep, even if called with lock held
Rubinius.lock counts how many times an object has been locked, and only releases the
lock when it has been unlocked an equal number of times. Therefore, if Lock#wait is
called on a Lock which was *already* locked, the call to Rubinius.unlock which occurs
before sleeping does not actually release the lock. This makes it impossible for other
threads to wake it up with #signal or #broadcast.
A solution is to make sure that #synchronize never calls Rubinius.lock on an object which
is already locked.
0 commit comments