diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-09-04 15:48:09 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-09-07 10:32:58 -0700 |
| commit | bb08ffbaf436e291b4be5cf7a471dda9744bfade (patch) | |
| tree | ef998da66d33aefec9c39c6a5f146ab216c8555e /src/rt/rust_task.cpp | |
| parent | 1339d0543407d653842503704642fb34f8e6a82d (diff) | |
| download | rust-bb08ffbaf436e291b4be5cf7a471dda9744bfade.tar.gz rust-bb08ffbaf436e291b4be5cf7a471dda9744bfade.zip | |
Refactor task failure a bit
Issue #236
Diffstat (limited to 'src/rt/rust_task.cpp')
| -rw-r--r-- | src/rt/rust_task.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 4ce6e44879b..993a6b25cfb 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -244,6 +244,7 @@ rust_task::fail() { // See note in ::kill() regarding who should call this. DLOG(sched, task, "task %s @0x%" PRIxPTR " failing", name, this); backtrace(); + die(); // Unblock the task so it can unwind. unblock(); if (supervisor) { @@ -257,6 +258,8 @@ rust_task::fail() { if (NULL == supervisor && propagate_failure) sched->fail(); failed = true; + notify_tasks_waiting_to_join(); + yield(4); } void |
