diff options
| author | Ben Blum <bblum@andrew.cmu.edu> | 2013-07-30 19:20:59 -0400 |
|---|---|---|
| committer | Ben Blum <bblum@andrew.cmu.edu> | 2013-07-31 14:37:22 -0400 |
| commit | 2e6dc161b6efac1ce2709ab4e1c05c55c01e3abf (patch) | |
| tree | 0d1425329ceab3ed0e4062355955de3060e685fb /src/libstd/rt/task.rs | |
| parent | 389aba09523f805e3b493a5089c6397749b06b67 (diff) | |
| download | rust-2e6dc161b6efac1ce2709ab4e1c05c55c01e3abf.tar.gz rust-2e6dc161b6efac1ce2709ab4e1c05c55c01e3abf.zip | |
Give tasks useful names. #2891
Diffstat (limited to 'src/libstd/rt/task.rs')
| -rw-r--r-- | src/libstd/rt/task.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs index 82d4f8fcc04..c1b799796d1 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -40,7 +40,9 @@ pub struct Task { taskgroup: Option<Taskgroup>, death: Death, destroyed: bool, - coroutine: Option<~Coroutine> + coroutine: Option<~Coroutine>, + // FIXME(#6874/#7599) use StringRef to save on allocations + name: Option<~str>, } pub struct Coroutine { @@ -90,7 +92,8 @@ impl Task { taskgroup: None, death: Death::new(), destroyed: false, - coroutine: Some(~Coroutine::new(stack_pool, start)) + coroutine: Some(~Coroutine::new(stack_pool, start)), + name: None, } } @@ -109,7 +112,8 @@ impl Task { // FIXME(#7544) make watching optional death: self.death.new_child(), destroyed: false, - coroutine: Some(~Coroutine::new(stack_pool, start)) + coroutine: Some(~Coroutine::new(stack_pool, start)), + name: None, } } |
