Fix hang in pipe-select when RUST_THREADS=1
This commit is contained in:
parent
7bba0ae973
commit
9728d14bae
1 changed files with 7 additions and 5 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue