diff options
author | bors-servo <release+servo@mozilla.com> | 2014-01-13 12:11:35 -0800 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2014-01-13 12:11:35 -0800 |
commit | 563d6ef91a43a4ebefb87281db7e4813d2afcee6 (patch) | |
tree | 696d330175cf5e50015d0e73aaa609642d7e05fa /src/components/util/time.rs | |
parent | 0555e671cad9ba1e6eca85c02bf55036413432c6 (diff) | |
parent | 193b6d26359515ade0f5449004649deeea003949 (diff) | |
download | servo-563d6ef91a43a4ebefb87281db7e4813d2afcee6.tar.gz servo-563d6ef91a43a4ebefb87281db7e4813d2afcee6.zip |
auto merge of #1457 : zmike/servo/master, r=jdm
this should resolve #1169
Diffstat (limited to 'src/components/util/time.rs')
-rw-r--r-- | src/components/util/time.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/components/util/time.rs b/src/components/util/time.rs index 59b01d264e7..911100bcb36 100644 --- a/src/components/util/time.rs +++ b/src/components/util/time.rs @@ -8,7 +8,7 @@ use extra::time::precise_time_ns; use extra::treemap::TreeMap; use std::comm::{Port, SharedChan}; use std::iter::AdditiveIterator; - +use task::{spawn_named}; // TODO: This code should be changed to use the commented code that uses timers // directly, once native timers land in Rust. @@ -26,7 +26,6 @@ impl Timer { } } - // front-end representation of the profiler used to communicate with the profiler #[deriving(Clone)] pub struct ProfilerChan(SharedChan<ProfilerMsg>); @@ -117,7 +116,7 @@ impl Profiler { Some(period) => { let period = (period * 1000f64) as u64; let chan = chan.clone(); - spawn(proc() { + spawn_named("Profiler timer", proc() { loop { Timer::sleep(period); if !chan.try_send(PrintMsg) { @@ -126,14 +125,14 @@ impl Profiler { } }); // Spawn the profiler - spawn(proc() { + spawn_named("Profiler", proc() { let mut profiler = Profiler::new(port); profiler.start(); }); } None => { // no-op to handle profiler messages when the profiler is inactive - spawn(proc() { + spawn_named("Profiler", proc() { while port.recv_opt().is_some() {} }); } |