Skip to content

Commit

Permalink
Update library/std/src/sys/windows/thread_parker.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Mara Bos <m-ou.se@m-ou.se>
  • Loading branch information
faern and m-ou-se authored Dec 22, 2020
1 parent 865e479 commit 454f3ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/windows/thread_parker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 454f3ed

Please sign in to comment.