diff options
| author | Pslydhh <luouyuyou@gmail.com> | 2018-06-02 15:36:23 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-02 15:36:23 +0800 |
| commit | 151e41ff0c2769b5bc9f0d37ae37136fb4fcb7e0 (patch) | |
| tree | 1f7b32dd848da13ef9a023d4d92d1fbb8fbd5a20 /src/libstd/thread/mod.rs | |
| parent | 7da469da8b9f389500d0dac17f67d8928386ef60 (diff) | |
| download | rust-151e41ff0c2769b5bc9f0d37ae37136fb4fcb7e0.tar.gz rust-151e41ff0c2769b5bc9f0d37ae37136fb4fcb7e0.zip | |
remove trailing whitespace
remove trailing whitespace
Diffstat (limited to 'src/libstd/thread/mod.rs')
| -rw-r--r-- | src/libstd/thread/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index d4ee172c961..d76107e9909 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -796,10 +796,10 @@ pub fn park() { let mut m = thread.inner.lock.lock().unwrap(); match thread.inner.state.compare_exchange(EMPTY, PARKED, SeqCst, SeqCst) { Ok(_) => {} - Err(NOTIFIED) => { + Err(NOTIFIED) => { // should consume this notification, so prohibit spurious wakeups in next park... - thread.inner.state.store(EMPTY, SeqCst); - return; + thread.inner.state.store(EMPTY, SeqCst); + return; }, // notified after we locked Err(_) => panic!("inconsistent park state"), } @@ -886,10 +886,10 @@ pub fn park_timeout(dur: Duration) { let m = thread.inner.lock.lock().unwrap(); match thread.inner.state.compare_exchange(EMPTY, PARKED, SeqCst, SeqCst) { Ok(_) => {} - Err(NOTIFIED) => { + Err(NOTIFIED) => { // should consume this notification, so prohibit spurious wakeups in next park... - thread.inner.state.store(EMPTY, SeqCst); - return; + thread.inner.state.store(EMPTY, SeqCst); + return; }, // notified after we locked Err(_) => panic!("inconsistent park_timeout state"), } |
