Skip to content

Commit

Permalink
removes tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pslydhh authored Jun 2, 2018
1 parent 151e41f commit b352d2d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/libstd/thread/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -797,10 +797,9 @@ pub fn park() {
match thread.inner.state.compare_exchange(EMPTY, PARKED, SeqCst, SeqCst) {
Ok(_) => {}
Err(NOTIFIED) => {
// should consume this notification, so prohibit spurious wakeups in next park...
thread.inner.state.store(EMPTY, SeqCst);
return;
}, // notified after we locked
thread.inner.state.store(EMPTY, SeqCst);
return;
} // should consume this notification, so prohibit spurious wakeups in next park.
Err(_) => panic!("inconsistent park state"),
}
loop {
Expand Down Expand Up @@ -887,10 +886,9 @@ pub fn park_timeout(dur: Duration) {
match thread.inner.state.compare_exchange(EMPTY, PARKED, SeqCst, SeqCst) {
Ok(_) => {}
Err(NOTIFIED) => {
// should consume this notification, so prohibit spurious wakeups in next park...
thread.inner.state.store(EMPTY, SeqCst);
return;
}, // notified after we locked
thread.inner.state.store(EMPTY, SeqCst);
return;
} // should consume this notification, so prohibit spurious wakeups in next park.
Err(_) => panic!("inconsistent park_timeout state"),
}

Expand Down

0 comments on commit b352d2d

Please sign in to comment.