Skip to content

Commit 249cb2a

Browse files
committed
Fix parked upgraders potentially not being woken up after a write lock
times out.
1 parent a0d2de0 commit 249cb2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/raw_rwlock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@ impl RawRwLock {
10551055
};
10561056
// SAFETY: `callback` does not panic or call any function of `parking_lot`.
10571057
unsafe {
1058-
self.wake_parked_threads(ONE_READER | UPGRADABLE_BIT, callback);
1058+
self.wake_parked_threads(prev_value, callback);
10591059
}
10601060
}
10611061
return false;

0 commit comments

Comments
 (0)