Skip to content

Commit 279ec9b

Browse files
committed
test: Join child threads on windows in tests
Windows tests can often deadlock if a child thread continues after the main thread and then panics, and a `println!` executed in a child thread after the main thread has exited is at risk of panicking.
1 parent a83201f commit 279ec9b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/test/run-pass/macro-with-braces-in-expr-position.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(std_misc)]
12-
1311
use std::thread;
1412

1513
macro_rules! expr { ($e: expr) => { $e } }
1614

1715
macro_rules! spawn {
1816
($($code: tt)*) => {
19-
expr!(thread::spawn(move|| {$($code)*}))
17+
expr!(thread::spawn(move|| {$($code)*}).join())
2018
}
2119
}
2220

0 commit comments

Comments
 (0)