File tree Expand file tree Collapse file tree 5 files changed +1
-5
lines changed Expand file tree Collapse file tree 5 files changed +1
-5
lines changed Original file line number Diff line number Diff line change 11// edition:2018
22// run-pass
33// ignore-emscripten no threads support
4- // ignore-sgx no thread sleep support
54
65use std:: thread;
76use std:: time:: Duration ;
Original file line number Diff line number Diff line change 22#![ allow( unused_must_use) ]
33#![ allow( deprecated) ]
44// ignore-emscripten no threads support
5- // ignore-sgx no thread sleep support
65
76use std:: sync:: mpsc:: { TryRecvError , channel} ;
87use std:: thread;
Original file line number Diff line number Diff line change 11// run-pass
22// compile-flags:--test
33// ignore-emscripten
4- // ignore-sgx no thread sleep support
54
65use std:: sync:: mpsc:: channel;
76use std:: sync:: mpsc:: TryRecvError ;
@@ -37,6 +36,7 @@ impl Barrier {
3736 fn wait ( self ) {
3837 self . shared . fetch_add ( 1 , Ordering :: SeqCst ) ;
3938 while self . shared . load ( Ordering :: SeqCst ) != self . count {
39+ thread:: yield_now ( ) ;
4040 }
4141 }
4242}
Original file line number Diff line number Diff line change 11// run-pass
22// ignore-emscripten no threads support
3- // ignore-sgx no thread sleep support
43
54use std:: thread:: { self , sleep} ;
65use std:: time:: Duration ;
Original file line number Diff line number Diff line change 44// ignore-emscripten no threads or sockets support
55// ignore-netbsd system ulimit (Too many open files)
66// ignore-openbsd system ulimit (Too many open files)
7- // ignore-sgx no thread sleep support
87
98use std:: io:: prelude:: * ;
109use std:: net:: { TcpListener , TcpStream } ;
You can’t perform that action at this time.
0 commit comments