From 9728d14baeb1f93da6ebe524b840ec9868c296ae Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Fri, 13 Jul 2012 15:51:06 -0700 Subject: [PATCH] Fix hang in pipe-select when RUST_THREADS=1 --- src/test/run-pass/pipe-select.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/test/run-pass/pipe-select.rs b/src/test/run-pass/pipe-select.rs index aeb355be5b3..05fe8f5ad05 100644 --- a/src/test/run-pass/pipe-select.rs +++ b/src/test/run-pass/pipe-select.rs @@ -47,9 +47,11 @@ fn main() { oneshot::server::waiting) = x; #error("selecting"); - let (i, _, _) = select(~[left, right]); - #error("selected"); - assert i == 1; + let (i, m, _) = select(~[left, right]); + #error("selected %?", i); + if m != none { + assert i == 1; + } }); let (c1, p1) = oneshot::init(); @@ -57,7 +59,7 @@ fn main() { let c = send(c, (p1, p2)); - sleep(iotask, 1000); + sleep(iotask, 100); signal(c1); @@ -66,7 +68,7 @@ fn main() { send(c, (p1, p2)); - sleep(iotask, 1000); + sleep(iotask, 100); signal(c2);