We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dfa6f88 commit 42523d9Copy full SHA for 42523d9
tests/pass/concurrency/sync.rs
@@ -77,13 +77,12 @@ fn check_conditional_variables_timed_wait_notimeout() {
77
let guard = lock.lock().unwrap();
78
79
let handle = thread::spawn(move || {
80
+ thread::sleep(Duration::from_millis(100)); // Make sure the other thread is waiting by the time we call `notify`.
81
let (_lock, cvar) = &*pair2;
82
cvar.notify_one();
83
});
84
- // macOS runners are very unreliable.
85
- let timeout = if cfg!(target_os = "macos") { 2000 } else { 500 };
86
- let (_guard, timeout) = cvar.wait_timeout(guard, Duration::from_millis(timeout)).unwrap();
+ let (_guard, timeout) = cvar.wait_timeout(guard, Duration::from_millis(500)).unwrap();
87
assert!(!timeout.timed_out());
88
handle.join().unwrap();
89
}
0 commit comments