Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unlock if poll triggers an exception
CRuby semantics for an interrupt during lock appear to ensure that the lock is released before propagating any interrupt exception. This poll was added without such behavior, leading to locks being left locked even though a thread interrupt happened. This in turn breaks some semantics of Mutex#synchronize, since the lock call does not happen within the try/finally that would release it, so any exception raised will exit synchronize with the lock still locked. The fix here wraps the additional poll with try/catch to ensure poll-triggered exceptions release the lock before propagating. Fixes jruby#8585
- Loading branch information