mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
call task::yield in comm::peek
This commit is contained in:
@@ -211,6 +211,9 @@ fn recv_<T: send>(p: *rust_port) -> T {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user