Skip to content

Commit 454f3ed

Browse files
faernm-ou-se
andauthored
Update library/std/src/sys/windows/thread_parker.rs
Co-authored-by: Mara Bos <[email protected]>
1 parent 865e479 commit 454f3ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/windows/thread_parker.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl Parker {
113113
// Wait for something to happen, assuming it's still set to PARKED.
114114
c::WaitOnAddress(self.ptr(), &PARKED as *const _ as c::LPVOID, 1, c::INFINITE);
115115
// Change NOTIFIED=>EMPTY but leave PARKED alone.
116-
if self.state.compare_exchange(NOTIFIED, EMPTY, Acquire, Acquire) == NOTIFIED {
116+
if self.state.compare_exchange(NOTIFIED, EMPTY, Acquire, Acquire).is_ok() {
117117
// Actually woken up by unpark().
118118
return;
119119
} else {

0 commit comments

Comments
 (0)