diff options
| author | Ted Horst <ted.horst@earthlink.net> | 2012-07-17 23:13:11 -0500 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-07-23 17:51:10 -0700 |
| commit | 78fa02106eefe7526a47808caaee0dbe1857ef2e (patch) | |
| tree | 10f6cc24c92cc07b9d5fd0245c99ada6ea75f4e3 /src | |
| parent | 28519c8ef64dc37ceab23d6a26a4ccea7f396a00 (diff) | |
| download | rust-78fa02106eefe7526a47808caaee0dbe1857ef2e.tar.gz rust-78fa02106eefe7526a47808caaee0dbe1857ef2e.zip | |
call task::yield in comm::peek
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcore/comm.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libcore/comm.rs b/src/libcore/comm.rs index e20278bc393..7e1ef280ea6 100644 --- a/src/libcore/comm.rs +++ b/src/libcore/comm.rs @@ -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 } |
