-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
Mutex.tryLock()
non-linearizability (#3781)
The scenario in question: - tryLock(owner), but the mutex was locked with the same owner - tryAcquire() fails - another thread releases the mutex - holdsLock(owner) fails, as the mutex is unlocked - another thread acquires the mutex with owner - isLocked returns true, and tryLock(owner) returns false. However, tryLock(o) should throw an exception. Fixes #3745 Signed-off-by: Nikita Koval <[email protected]> Co-authored-by: Vsevolod Tolstopyatov <[email protected]>
- Loading branch information
Showing
1 changed file
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters