1
Fork 0

Fix hang in pipe-select when RUST_THREADS=1

This commit is contained in:
Eric Holk 2012-07-13 15:51:06 -07:00
parent 7bba0ae973
commit 9728d14bae

View file

@ -47,9 +47,11 @@ fn main() {
oneshot::server::waiting) oneshot::server::waiting)
= x; = x;
#error("selecting"); #error("selecting");
let (i, _, _) = select(~[left, right]); let (i, m, _) = select(~[left, right]);
#error("selected"); #error("selected %?", i);
assert i == 1; if m != none {
assert i == 1;
}
}); });
let (c1, p1) = oneshot::init(); let (c1, p1) = oneshot::init();
@ -57,7 +59,7 @@ fn main() {
let c = send(c, (p1, p2)); let c = send(c, (p1, p2));
sleep(iotask, 1000); sleep(iotask, 100);
signal(c1); signal(c1);
@ -66,7 +68,7 @@ fn main() {
send(c, (p1, p2)); send(c, (p1, p2));
sleep(iotask, 1000); sleep(iotask, 100);
signal(c2); signal(c2);