We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43f2c19 commit 2854f0cCopy full SHA for 2854f0c
src/libstd/sync/condvar.rs
@@ -420,14 +420,15 @@ mod tests {
420
static M: StaticMutex = MUTEX_INIT;
421
422
let g = M.lock().unwrap();
423
- let (g, success) = C.wait_timeout(g, Duration::nanoseconds(1000)).unwrap();
424
- assert!(!success);
+ let (g, _no_timeout) = C.wait_timeout(g, Duration::nanoseconds(1000)).unwrap();
+ // spurious wakeups mean this isn't necessarily true
425
+ // assert!(!no_timeout);
426
let _t = Thread::spawn(move || {
427
let _g = M.lock().unwrap();
428
C.notify_one();
429
});
- let (g, success) = C.wait_timeout(g, Duration::days(1)).unwrap();
430
- assert!(success);
+ let (g, no_timeout) = C.wait_timeout(g, Duration::days(1)).unwrap();
431
+ assert!(no_timeout);
432
drop(g);
433
unsafe { C.destroy(); M.destroy(); }
434
}
0 commit comments