1
Fork 0

call task::yield in comm::peek

This commit is contained in:
Ted Horst 2012-07-17 23:13:11 -05:00 committed by Graydon Hoare
parent 28519c8ef6
commit 78fa02106e

View file

@ -211,6 +211,9 @@ fn recv_<T: send>(p: *rust_port) -> T {
} }
fn peek_(p: *rust_port) -> bool { fn peek_(p: *rust_port) -> bool {
// Yield here before we check to see if someone sent us a message
// FIXME #524, if the compilergenerates yields, we don't need this
task::yield();
rustrt::rust_port_size(p) != 0u as libc::size_t rustrt::rust_port_size(p) != 0u as libc::size_t
} }