From 2e6dc161b6efac1ce2709ab4e1c05c55c01e3abf Mon Sep 17 00:00:00 2001 From: Ben Blum Date: Tue, 30 Jul 2013 19:20:59 -0400 Subject: Give tasks useful names. #2891 --- src/libstd/rt/task.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/libstd/rt/task.rs') 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, 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, } } -- cgit 1.4.1-3-g733a5