about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-03-26 02:33:36 +0000
committerbors <bors@rust-lang.org>2015-03-26 02:33:36 +0000
commitd4ba1caa99e63b14f6b4d0789344c7ad11100744 (patch)
tree320c4dd482faae768aa36e74730fe1b63a671e6f /src
parent27901849e07558639b8decc03707e0317ae8280e (diff)
parent02c6f6b04928480d302f25520a5c06d55e91eaf8 (diff)
downloadrust-d4ba1caa99e63b14f6b4d0789344c7ad11100744.tar.gz
rust-d4ba1caa99e63b14f6b4d0789344c7ad11100744.zip
Auto merge of #23718 - alexcrichton:flaky-test, r=huonw
It's considered an error to access stdout while a process is being shut down, so
tweak this test a bit to actually wait for the child thread to exit.

This was discovered with a recent [snap-mac3 failure](http://buildbot.rust-lang.org/builders/snap3-mac/builds/164/steps/test/logs/stdio)
Diffstat (limited to 'src')
-rw-r--r--src/test/run-pass/extern-call-deep2.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/run-pass/extern-call-deep2.rs b/src/test/run-pass/extern-call-deep2.rs
index 7bbed563a99..198745f5b19 100644
--- a/src/test/run-pass/extern-call-deep2.rs
+++ b/src/test/run-pass/extern-call-deep2.rs
@@ -8,10 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![feature(std_misc, libc)]
+#![feature(libc)]
 
 extern crate libc;
-use std::thread::Thread;
+use std::thread;
 
 mod rustrt {
     extern crate libc;
@@ -42,9 +42,9 @@ fn count(n: libc::uintptr_t) -> libc::uintptr_t {
 pub fn main() {
     // Make sure we're on a task with small Rust stacks (main currently
     // has a large stack)
-    let _t = Thread::spawn(move|| {
+    thread::scoped(move|| {
         let result = count(1000);
         println!("result = {}", result);
         assert_eq!(result, 1000);
-    });
+    }).join();
 }