Skip to content

Commit

Permalink
call task::yield in comm::peek
Browse files Browse the repository at this point in the history
  • Loading branch information
tedhorst authored and graydon committed Jul 24, 2012
1 parent 28519c8 commit 78fa021
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libcore/comm.rs
Expand Up @@ -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
}

Expand Down

0 comments on commit 78fa021

Please sign in to comment.