-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Description
extern mod std;
use core::pipes::*;
use std::comm::DuplexStream;
use core::task;
fn main () {
let (chan, port): (Chan<int>, Port<int>) = stream();
do task::spawn() |move port| {
assert port.recv() == 123;
assert !port.peek();
}
chan.send(123);
}
There is no message available but peek returns true, likely because this: https://github.com/mozilla/rust/blob/incoming/src/libcore/pipes.rs#L516
I expect that anytime peek
returns true I can call recv
successfully.
Metadata
Metadata
Assignees
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.