Skip to content

Commit feeca94

Browse files
authored
Auto merge of #34983 - alexcrichton:windows-flaky, r=brson
std: Ignore tests where threads outlive main Long ago we discovered that threads which outlive main and then exit while the rest of the program is exiting causes Windows to hang (#20704). That's what was happening in this test so let's just not run this test any more.
2 parents 9316ae5 + 8487666 commit feeca94

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/liballoc/arc.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
//!
2222
//! Sharing some immutable data between threads:
2323
//!
24+
// Note that we **do not** run these tests here. The windows builders get super
25+
// unhappy of a thread outlives the main thread and then exits at the same time
26+
// (something deadlocks) so we just avoid this entirely by not running these
27+
// tests.
2428
//! ```no_run
2529
//! use std::sync::Arc;
2630
//! use std::thread;
@@ -97,7 +101,8 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
97101
/// by putting it inside `Mutex` and then share `Mutex` immutably
98102
/// with `Arc<T>` as shown below.
99103
///
100-
/// ```
104+
// See comment at the top of this file for why the test is no_run
105+
/// ```no_run
101106
/// use std::sync::{Arc, Mutex};
102107
/// use std::thread;
103108
///

0 commit comments

Comments
 (0)