Skip to content
Permalink
Browse files

move back to check

  • Loading branch information...
abby
abby committed Mar 25, 2019
1 parent 37e7cf3 commit d3c9403762a34bbe11642419f66658844ec4d75d
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/wait.rs
@@ -31,7 +31,10 @@ pub fn load_tagless(val: &AtomicUsize) -> usize {
#[inline(always)]
pub fn check(seq: usize, at: &AtomicUsize, wc: &AtomicUsize) -> bool {
let cur_count = load_tagless(at);
use std::{thread, time};
thread::sleep(time::Duration::from_nanos(10));
wc.load(Relaxed) == 0 || seq == cur_count || past(seq, cur_count).1

}

/// This is the trait that something implements to allow receivers
@@ -123,9 +126,6 @@ impl Wait for BusyWait {
if check(seq, w_pos, wc) {
return;
}

use std::{thread, time};
thread::sleep(time::Duration::from_millis(10));
}
}

0 comments on commit d3c9403

Please sign in to comment.
You can’t perform that action at this time.