File tree 1 file changed +5
-3
lines changed
tests/pass-dep/concurrency
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
//@only-target: darwin
2
+ //@compile-flags: -Zmiri-preemption-rate=0
2
3
3
4
use std:: time:: { Duration , Instant } ;
4
5
use std:: { io, ptr, thread} ;
@@ -173,7 +174,7 @@ fn wait_wake_multiple() {
173
174
) ;
174
175
} ) ;
175
176
176
- thread:: sleep ( Duration :: from_millis ( 200 ) ) ;
177
+ thread:: yield_now ( ) ;
177
178
}
178
179
179
180
// Wake the threads up again.
@@ -230,7 +231,7 @@ fn param_mismatch() {
230
231
} ) ;
231
232
232
233
s. spawn ( || {
233
- thread:: sleep ( Duration :: from_millis ( 200 ) ) ;
234
+ thread:: yield_now ( ) ;
234
235
unsafe {
235
236
assert_eq ! (
236
237
libc:: os_sync_wait_on_address(
@@ -246,7 +247,8 @@ fn param_mismatch() {
246
247
}
247
248
} ) ;
248
249
249
- thread:: sleep ( Duration :: from_millis ( 200 ) ) ;
250
+ thread:: yield_now ( ) ;
251
+
250
252
unsafe {
251
253
assert_eq ! (
252
254
libc:: os_sync_wake_by_address_any(
You can’t perform that action at this time.
0 commit comments