-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
After the change in #8404, a new bug was introduced.
If a thread interrupt triggers in the added pollThreadEvents call at the bottom of Mutex#lock, it might cause Mutex#synchronize to exit without releasing the lock.
This is the changed line from #8404:
| thread.pollThreadEvents(context); |
The lock method is called here in synchronize:
| lock(context); |
Note that this lock call occurs outside of the try on purpose; if an error is thrown before the lock is successful, we should not attempt to unlock it. But due to the changed line above, an error might occur after the lock is acquired.
The fix would be to immediately unlock if the new pollThreadEvents receives an exception-raising event (from Thread#kill or Thread#raise).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels