From eaa63266d8456ac8c3d1b82f4e1078fcd271e95c Mon Sep 17 00:00:00 2001 From: Vytautas Astrauskas Date: Mon, 20 Apr 2020 17:02:43 -0700 Subject: [PATCH] Make multiple threads to try to join a thread while it is still running. --- tests/compile-fail/concurrency/libc_pthread_join_multiple.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/compile-fail/concurrency/libc_pthread_join_multiple.rs b/tests/compile-fail/concurrency/libc_pthread_join_multiple.rs index 949fcc282f0f..0d99b69ed914 100644 --- a/tests/compile-fail/concurrency/libc_pthread_join_multiple.rs +++ b/tests/compile-fail/concurrency/libc_pthread_join_multiple.rs @@ -10,6 +10,8 @@ use std::{mem, ptr}; extern "C" fn thread_start(_null: *mut libc::c_void) -> *mut libc::c_void { + thread::yield_now(); + thread::yield_now(); ptr::null_mut() }