diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-07-14 18:49:18 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-07-14 18:49:18 -0700 |
| commit | c99e110119daa3e5cff1a54424c87e3fa4c9b4c5 (patch) | |
| tree | 24920ae69e936223aae0c5605e5fda341cf4c4c7 /src/rt/rust_upcall.cpp | |
| parent | 01a52d728c5058769e6c0939c57579821f238056 (diff) | |
| download | rust-c99e110119daa3e5cff1a54424c87e3fa4c9b4c5.tar.gz rust-c99e110119daa3e5cff1a54424c87e3fa4c9b4c5.zip | |
Modify upcall_fail so that failing tasks relinquish control to the scheduler
This is sufficient to let unsupervised tasks that don't allocate fail without crashing or leaking.
Diffstat (limited to 'src/rt/rust_upcall.cpp')
| -rw-r--r-- | src/rt/rust_upcall.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp index 16d7f7c4f83..b6b8fb28668 100644 --- a/src/rt/rust_upcall.cpp +++ b/src/rt/rust_upcall.cpp @@ -221,6 +221,9 @@ upcall_fail(rust_task *task, LOG_UPCALL_ENTRY(task); LOG_ERR(task, upcall, "upcall fail '%s', %s:%" PRIdPTR, expr, file, line); task->fail(); + task->die(); + task->notify_tasks_waiting_to_join(); + task->yield(4); } /** |
