Skip to content

Commit b6044c7

Browse files
committed
Make some tests less flaky on windows.
Be sure to join() the panicking threads so they're not running when the program is shutting down.
1 parent 5250ef5 commit b6044c7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: src/test/run-pass/unwind-resource.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn f(tx: Sender<bool>) {
3737

3838
pub fn main() {
3939
let (tx, rx) = channel();
40-
let _t = thread::spawn(move|| f(tx.clone()));
40+
let _t = thread::scoped(move|| f(tx.clone()));
4141
println!("hiiiiiiiii");
4242
assert!(rx.recv().unwrap());
4343
}

Diff for: src/test/run-pass/unwind-unique.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ fn f() {
1919
}
2020

2121
pub fn main() {
22-
let _t = thread::spawn(f);
22+
let _t = thread::scoped(f);
2323
}

0 commit comments

Comments
 (0)