diff options
| author | Michael Bebenita <mbebenita@mozilla.com> | 2010-07-28 16:24:50 -0700 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2010-07-28 20:30:29 -0700 |
| commit | 4ff8e15128f90d4e9e57897c48280c6f82bb8343 (patch) | |
| tree | 86c3808e729b4f596c3c23e228738d3d25b108bc /src/rt/rust_task.cpp | |
| parent | defd8a66eade4cb11960cf6de2b45c2f42ec3388 (diff) | |
| download | rust-4ff8e15128f90d4e9e57897c48280c6f82bb8343.tar.gz rust-4ff8e15128f90d4e9e57897c48280c6f82bb8343.zip | |
Move notification-messages out into their own file and unify into notify_message, make them use proxies, cache task proxies in dom.
Diffstat (limited to 'src/rt/rust_task.cpp')
| -rw-r--r-- | src/rt/rust_task.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 189824ac16a..b3caac252b9 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -385,6 +385,24 @@ rust_task::notify_waiting_tasks() } } +void +rust_task::notify_tasks_waiting_to_join() { + while (tasks_waiting_to_join.is_empty() == false) { + log(rust_log::ALL, "notify_tasks_waiting_to_join: %d", + tasks_waiting_to_join.size()); + maybe_proxy<rust_task> *waiting_task = tasks_waiting_to_join.pop(); + if (waiting_task->is_proxy()) { + notify_message::send(notify_message::WAKEUP, "wakeup", + this, waiting_task->as_proxy()); + } else { + rust_task *task = waiting_task->delegate(); + if (task->dead() == false) { + task->wakeup(this); + } + } + } +} + uintptr_t rust_task::get_fp() { // sp in any suspended task points to the last callee-saved reg on |
