Update library/std/src/sys/windows/thread_parker.rs
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
This commit is contained in:
parent
865e4797df
commit
454f3ed902
|
@ -113,7 +113,7 @@ impl Parker {
|
|||
// Wait for something to happen, assuming it's still set to PARKED.
|
||||
c::WaitOnAddress(self.ptr(), &PARKED as *const _ as c::LPVOID, 1, c::INFINITE);
|
||||
// Change NOTIFIED=>EMPTY but leave PARKED alone.
|
||||
if self.state.compare_exchange(NOTIFIED, EMPTY, Acquire, Acquire) == NOTIFIED {
|
||||
if self.state.compare_exchange(NOTIFIED, EMPTY, Acquire, Acquire).is_ok() {
|
||||
// Actually woken up by unpark().
|
||||
return;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue