File tree 5 files changed +1
-5
lines changed
5 files changed +1
-5
lines changed Original file line number Diff line number Diff line change 1
1
// edition:2018
2
2
// run-pass
3
3
// ignore-emscripten no threads support
4
- // ignore-sgx no thread sleep support
5
4
6
5
use std:: thread;
7
6
use std:: time:: Duration ;
Original file line number Diff line number Diff line change 2
2
#![ allow( unused_must_use) ]
3
3
#![ allow( deprecated) ]
4
4
// ignore-emscripten no threads support
5
- // ignore-sgx no thread sleep support
6
5
7
6
use std:: sync:: mpsc:: { TryRecvError , channel} ;
8
7
use std:: thread;
Original file line number Diff line number Diff line change 1
1
// run-pass
2
2
// compile-flags:--test
3
3
// ignore-emscripten
4
- // ignore-sgx no thread sleep support
5
4
6
5
use std:: sync:: mpsc:: channel;
7
6
use std:: sync:: mpsc:: TryRecvError ;
@@ -37,6 +36,7 @@ impl Barrier {
37
36
fn wait ( self ) {
38
37
self . shared . fetch_add ( 1 , Ordering :: SeqCst ) ;
39
38
while self . shared . load ( Ordering :: SeqCst ) != self . count {
39
+ thread:: yield_now ( ) ;
40
40
}
41
41
}
42
42
}
Original file line number Diff line number Diff line change 1
1
// run-pass
2
2
// ignore-emscripten no threads support
3
- // ignore-sgx no thread sleep support
4
3
5
4
use std:: thread:: { self , sleep} ;
6
5
use std:: time:: Duration ;
Original file line number Diff line number Diff line change 4
4
// ignore-emscripten no threads or sockets support
5
5
// ignore-netbsd system ulimit (Too many open files)
6
6
// ignore-openbsd system ulimit (Too many open files)
7
- // ignore-sgx no thread sleep support
8
7
9
8
use std:: io:: prelude:: * ;
10
9
use std:: net:: { TcpListener , TcpStream } ;
You can’t perform that action at this time.
0 commit comments