about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-05-27 09:15:19 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-05-27 09:15:19 -0700
commit279ec9b9b871dc6ef52ebc808adca177f596795e (patch)
treecfda85c9eb94897aaa8836d843fdf9b4be447989
parenta83201ff9fbf217e8dc963a65a992e6ead3aafba (diff)
downloadrust-279ec9b9b871dc6ef52ebc808adca177f596795e.tar.gz
rust-279ec9b9b871dc6ef52ebc808adca177f596795e.zip
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.
-rw-r--r--src/test/run-pass/macro-with-braces-in-expr-position.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/run-pass/macro-with-braces-in-expr-position.rs b/src/test/run-pass/macro-with-braces-in-expr-position.rs
index 4881a5ab647..326d1cafe6c 100644
--- a/src/test/run-pass/macro-with-braces-in-expr-position.rs
+++ b/src/test/run-pass/macro-with-braces-in-expr-position.rs
@@ -8,15 +8,13 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(std_misc)]
-
 use std::thread;
 
 macro_rules! expr { ($e: expr) => { $e } }
 
 macro_rules! spawn {
     ($($code: tt)*) => {
-        expr!(thread::spawn(move|| {$($code)*}))
+        expr!(thread::spawn(move|| {$($code)*}).join())
     }
 }