Skip to content

Commit 0ae37b4

Browse files
authored
Remove racy check from sharedlock unittest (#427)
This was falling in the symgc project, very occasionally. What was happening: 1. unittest main thread unlocks the lock 2. exclusive locker thread is woken up to check its condition again, and takes the lock 3. Race! sometimes this lock is held, sometimes it isn't.
1 parent 898aa81 commit 0ae37b4

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

sdlib/d/sync/sharedlock.d

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,6 @@ unittest exclusiveAndSharedLock {
514514
lock.mutex.unlock();
515515

516516
assert(lock.count == SharedLock.Exclusive + 2);
517-
assert(!lock.mutex.isHeld());
518517
assert(exclusiveState.load() == 1);
519518
sharedState.waitForState(2, 0);
520519

0 commit comments

Comments
 (0)