Skip to content

Commit eaa6326

Browse files
author
Vytautas Astrauskas
committed
Make multiple threads to try to join a thread while it is still running.
1 parent d45e985 commit eaa6326

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/compile-fail/concurrency/libc_pthread_join_multiple.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ use std::thread;
1010
use std::{mem, ptr};
1111

1212
extern "C" fn thread_start(_null: *mut libc::c_void) -> *mut libc::c_void {
13+
thread::yield_now();
14+
thread::yield_now();
1315
ptr::null_mut()
1416
}
1517

0 commit comments

Comments
 (0)