Skip to content

Commit 78fa021

Browse files
tedhorstgraydon
authored andcommitted
call task::yield in comm::peek
1 parent 28519c8 commit 78fa021

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libcore/comm.rs

+3
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ fn recv_<T: send>(p: *rust_port) -> T {
211211
}
212212

213213
fn peek_(p: *rust_port) -> bool {
214+
// Yield here before we check to see if someone sent us a message
215+
// FIXME #524, if the compilergenerates yields, we don't need this
216+
task::yield();
214217
rustrt::rust_port_size(p) != 0u as libc::size_t
215218
}
216219

0 commit comments

Comments
 (0)