File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -420,14 +420,15 @@ mod tests {
420
420
static M : StaticMutex = MUTEX_INIT ;
421
421
422
422
let g = M . lock ( ) . unwrap ( ) ;
423
- let ( g, success) = C . wait_timeout ( g, Duration :: nanoseconds ( 1000 ) ) . unwrap ( ) ;
424
- assert ! ( !success) ;
423
+ let ( g, _no_timeout) = C . wait_timeout ( g, Duration :: nanoseconds ( 1000 ) ) . unwrap ( ) ;
424
+ // spurious wakeups mean this isn't necessarily true
425
+ // assert!(!no_timeout);
425
426
let _t = Thread :: spawn ( move || {
426
427
let _g = M . lock ( ) . unwrap ( ) ;
427
428
C . notify_one ( ) ;
428
429
} ) ;
429
- let ( g, success ) = C . wait_timeout ( g, Duration :: days ( 1 ) ) . unwrap ( ) ;
430
- assert ! ( success ) ;
430
+ let ( g, no_timeout ) = C . wait_timeout ( g, Duration :: days ( 1 ) ) . unwrap ( ) ;
431
+ assert ! ( no_timeout ) ;
431
432
drop ( g) ;
432
433
unsafe { C . destroy ( ) ; M . destroy ( ) ; }
433
434
}
You can’t perform that action at this time.
0 commit comments