about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-11-01 09:16:11 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-11-01 09:16:11 -0700
commite2a68b6867188c4192a7986bdbf1bddf690e24d7 (patch)
tree9e476e536d8087e5298c1d5f084e01da2d25d0e2 /src/libstd/rt
parente976de32dc590f759e6c0c72d286844ca373e775 (diff)
downloadrust-e2a68b6867188c4192a7986bdbf1bddf690e24d7.tar.gz
rust-e2a68b6867188c4192a7986bdbf1bddf690e24d7.zip
Give test and main tasks better names
Tests now have the same name as the test that they're running (to allow for
easier diagnosing of failure sources), and the main task is now specially named
<main> instead of <unnamed>.

Closes #10195
Closes #10073
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs
index a247b4afb80..a5c0d3be044 100644
--- a/src/libstd/rt/mod.rs
+++ b/src/libstd/rt/mod.rs
@@ -68,6 +68,7 @@ use rt::sched::{Scheduler, Shutdown};
 use rt::sleeper_list::SleeperList;
 use rt::task::UnwindResult;
 use rt::task::{Task, SchedTask, GreenTask, Sched};
+use send_str::SendStrStatic;
 use unstable::atomics::{AtomicInt, AtomicBool, SeqCst};
 use unstable::sync::UnsafeArc;
 use vec::{OwnedVector, MutableVector, ImmutableVector};
@@ -373,6 +374,7 @@ fn run_(main: ~fn(), use_main_sched: bool) -> int {
         // run the main task in one of our threads.
 
         let mut main_task = ~Task::new_root(&mut scheds[0].stack_pool, None, main.take());
+        main_task.name = Some(SendStrStatic("<main>"));
         main_task.death.on_exit = Some(on_exit.take());
         let main_task_cell = Cell::new(main_task);
 
@@ -410,6 +412,7 @@ fn run_(main: ~fn(), use_main_sched: bool) -> int {
         let home = Sched(main_sched.make_handle());
         let mut main_task = ~Task::new_root_homed(&mut main_sched.stack_pool, None,
                                                   home, main.take());
+        main_task.name = Some(SendStrStatic("<main>"));
         main_task.death.on_exit = Some(on_exit.take());
         rtdebug!("bootstrapping main_task");