about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorEric Holk <eric.holk@gmail.com>2012-07-10 10:58:44 -0700
committerEric Holk <eric.holk@gmail.com>2012-07-10 22:00:47 -0700
commit26e6eb3d14d7ff3bcbfa5ca442a6928776982e98 (patch)
tree81a017f6b8e77536ec47fb0b9045c34979edeec9 /src/rt/rust_task.cpp
parentd07e537fc3daaf73b7baf652e13ee2d36706258e (diff)
downloadrust-26e6eb3d14d7ff3bcbfa5ca442a6928776982e98.tar.gz
rust-26e6eb3d14d7ff3bcbfa5ca442a6928776982e98.zip
Handle failure conditions correctly in pipes.
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 6a9f5cf5001..f5e2fcc9a08 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -713,16 +713,14 @@ rust_task::allow_kill() {
 }
 
 void *
-rust_task::wait_event() {
+rust_task::wait_event(bool *killed) {
     scoped_lock with(state_lock);
 
     if(!event_reject) {
         block_locked(&event_cond, "waiting on event");
-        bool killed = false;
         state_lock.unlock();
-        yield(&killed);
+        yield(killed);
         state_lock.lock();
-        // TODO: what is the right thing to do if we are killed?
     }
 
     event_reject = false;