diff options
| author | Ben Blum <bblum@andrew.cmu.edu> | 2013-07-12 22:45:19 -0400 |
|---|---|---|
| committer | Ben Blum <bblum@andrew.cmu.edu> | 2013-07-20 05:08:57 -0400 |
| commit | 9bbec651dfff68c93d7213fceadecc21c324b0cb (patch) | |
| tree | e24d1cf629094c67a166615d31b936e9b1855e97 /src/libstd/rt/task.rs | |
| parent | e2a42416ddab88f7ed076cb9a4fd6ecc70be3278 (diff) | |
| download | rust-9bbec651dfff68c93d7213fceadecc21c324b0cb.tar.gz rust-9bbec651dfff68c93d7213fceadecc21c324b0cb.zip | |
Replace *rust_task ptrs in taskgroup code with TaskHandle, for transitioning to newsched killing.
Diffstat (limited to 'src/libstd/rt/task.rs')
| -rw-r--r-- | src/libstd/rt/task.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs index a1227dd180c..f6e2faf5bf1 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -27,6 +27,7 @@ use super::local_heap::LocalHeap; use rt::sched::{Scheduler, SchedHandle}; use rt::stack::{StackSegment, StackPool}; use rt::context::Context; +use task::spawn::TCB; use cell::Cell; pub struct Task { @@ -36,6 +37,7 @@ pub struct Task { logger: StdErrLogger, unwinder: Unwinder, home: Option<SchedHome>, + taskgroup: Option<TCB>, death: Death, destroyed: bool, coroutine: Option<~Coroutine> @@ -85,6 +87,7 @@ impl Task { logger: StdErrLogger, unwinder: Unwinder { unwinding: false }, home: Some(home), + taskgroup: None, death: Death::new(), destroyed: false, coroutine: Some(~Coroutine::new(stack_pool, start)) @@ -102,6 +105,7 @@ impl Task { logger: StdErrLogger, home: Some(home), unwinder: Unwinder { unwinding: false }, + taskgroup: None, // FIXME(#7544) make watching optional death: self.death.new_child(), destroyed: false, @@ -121,6 +125,7 @@ impl Task { } self.unwinder.try(f); + { let _ = self.taskgroup.take(); } self.death.collect_failure(!self.unwinder.unwinding); self.destroy(); } |
