Skip to content

Commit

Permalink
Auto merge of #25824 - alexcrichton:fix-deadlocking-test-on-windows, …
Browse files Browse the repository at this point in the history
…r=nikomatsakis

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.
  • Loading branch information
bors committed May 28, 2015
2 parents f76d9bc + 279ec9b commit 1a3cffb
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/test/run-pass/macro-with-braces-in-expr-position.rs
Expand Up @@ -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())
}
}

Expand Down

0 comments on commit 1a3cffb

Please sign in to comment.