aboutsummaryrefslogtreecommitdiff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-05 14:43:40 -0700
committerGraydon Hoare <[email protected]>2010-07-05 14:43:40 -0700
commitb1eeb9b8256f42c9525832b6126a0e47d675e11e (patch)
tree42a6d5593203f590af6d663212c759eaaa471807 /src/rt/rust_task.cpp
parentUn-XFAIL mutable-alias-vec.rs. Was only failing due to a typo, but a more tho... (diff)
downloadrust-b1eeb9b8256f42c9525832b6126a0e47d675e11e.tar.xz
rust-b1eeb9b8256f42c9525832b6126a0e47d675e11e.zip
Change from 'spawner' to 'supervisor' in rust_task, and add an unsupervise call.
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index 5e230a58..09239c58 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -62,7 +62,7 @@ rust_task::rust_task(rust_dom *dom, rust_task *spawner) :
state(&dom->running_tasks),
cond(NULL),
dptr(0),
- spawner(spawner),
+ supervisor(spawner),
idx(0),
waiting_tasks(dom),
alarm(this)
@@ -336,12 +336,12 @@ rust_task::fail(size_t nargs) {
if (this == dom->root_task)
dom->fail();
run_after_return(nargs, dom->root_crate->get_unwind_glue());
- if (spawner) {
+ if (supervisor) {
dom->log(rust_log::TASK,
"task 0x%" PRIxPTR
- " propagating failure to parent 0x%" PRIxPTR,
- this, spawner);
- spawner->kill();
+ " propagating failure to supervisor 0x%" PRIxPTR,
+ this, supervisor);
+ supervisor->kill();
}
}
@@ -354,6 +354,15 @@ rust_task::gc(size_t nargs)
}
void
+rust_task::unsupervise()
+{
+ dom->log(rust_log::TASK,
+ "task 0x%" PRIxPTR " disconnecting from supervisor 0x%" PRIxPTR,
+ this, supervisor);
+ supervisor = NULL;
+}
+
+void
rust_task::notify_waiting_tasks()
{
while (waiting_tasks.length() > 0) {