File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -380,12 +380,6 @@ impl Condvar {
380380 ///
381381 /// Like `wait`, the lock specified will be re-acquired when this function
382382 /// returns, regardless of whether the timeout elapsed or not.
383- ///
384- /// # Panics
385- ///
386- /// Panics if the given `timeout` is so large that it can't be added to the current time.
387- /// This panic is not possible if the crate is built with the `nightly` feature, then a too
388- /// large `timeout` becomes equivalent to just calling `wait`.
389383 #[ inline]
390384 pub fn wait_for < T : ?Sized > (
391385 & self ,
@@ -556,14 +550,7 @@ mod tests {
556550 let _g = m2. lock ( ) ;
557551 c2. notify_one ( ) ;
558552 } ) ;
559- // Non-nightly panics on too large timeouts. Nightly treats it as indefinite wait.
560- let very_long_timeout = if cfg ! ( feature = "nightly" ) {
561- Duration :: from_secs ( u64:: max_value ( ) )
562- } else {
563- Duration :: from_millis ( u32:: max_value ( ) as u64 )
564- } ;
565-
566- let timeout_res = c. wait_for ( & mut g, very_long_timeout) ;
553+ let timeout_res = c. wait_for ( & mut g, Duration :: from_secs ( u64:: max_value ( ) ) ) ;
567554 assert ! ( !timeout_res. timed_out( ) ) ;
568555
569556 drop ( g) ;
Original file line number Diff line number Diff line change 55// http://opensource.org/licenses/MIT>, at your option. This file may not be
66// copied, modified, or distributed except according to those terms.
77
8- #[ cfg( all( feature = "nightly " , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
8+ #[ cfg( all( feature = "hardware-lock-elision " , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
99use std:: arch:: asm;
1010use std:: sync:: atomic:: AtomicUsize ;
1111
You can’t perform that action at this time.
0 commit comments