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 {
420420 static M : StaticMutex = MUTEX_INIT ;
421421
422422 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);
425426 let _t = Thread :: spawn ( move || {
426427 let _g = M . lock ( ) . unwrap ( ) ;
427428 C . notify_one ( ) ;
428429 } ) ;
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 ) ;
431432 drop ( g) ;
432433 unsafe { C . destroy ( ) ; M . destroy ( ) ; }
433434 }
You can’t perform that action at this time.
0 commit comments