Skip to content

Commit 50b2ade

Browse files
committed
Revert the usage of compare_exchange_weak
1 parent 7a40b6d commit 50b2ade

File tree

1 file changed

+1
-1
lines changed
  • library/std/src/sys_common/thread_parker

1 file changed

+1
-1
lines changed

library/std/src/sys_common/thread_parker/futex.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl Parker {
4949
// Wait for something to happen, assuming it's still set to PARKED.
5050
futex_wait(&self.state, PARKED, None);
5151
// Change NOTIFIED=>EMPTY and return in that case.
52-
if self.state.compare_exchange_weak(NOTIFIED, EMPTY, Acquire, Acquire).is_ok() {
52+
if self.state.compare_exchange(NOTIFIED, EMPTY, Acquire, Acquire).is_ok() {
5353
return;
5454
} else {
5555
// Spurious wake up. We loop to try again.

0 commit comments

Comments
 (0)