Skip to content

Commit d6d3377

Browse files
Manishearthalexcrichton
authored andcommitted
Rollup merge of rust-lang#22723 - alexcrichton:less-flaky-windows-test, r=alexcrichton
If these tests exit while a thread is panicking it often leads to situations like rust-lang#22628.
2 parents 8eb655b + 2408436 commit d6d3377

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/test/run-pass/unwind-resource.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ 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::spawn(move|| f(tx.clone()));
4141
println!("hiiiiiiiii");
4242
assert!(rx.recv().unwrap());
43+
drop(t.join());
4344
}

src/test/run-pass/unwind-unique.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ fn f() {
1919
}
2020

2121
pub fn main() {
22-
let _t = thread::spawn(f);
22+
let t = thread::spawn(f);
23+
drop(t.join());
2324
}

0 commit comments

Comments
 (0)