diff options
| author | Eric Holk <eric.holk@gmail.com> | 2012-07-10 10:58:44 -0700 |
|---|---|---|
| committer | Eric Holk <eric.holk@gmail.com> | 2012-07-10 22:00:47 -0700 |
| commit | 26e6eb3d14d7ff3bcbfa5ca442a6928776982e98 (patch) | |
| tree | 81a017f6b8e77536ec47fb0b9045c34979edeec9 /src/rt/rust_task.cpp | |
| parent | d07e537fc3daaf73b7baf652e13ee2d36706258e (diff) | |
| download | rust-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.cpp | 6 |
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; |
