diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-01-05 01:27:48 -0700 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-01-05 01:27:48 -0700 |
commit | 65ee8166bd64e911502e29a050258b70d9f263aa (patch) | |
tree | ce07cf4b6d71f25c645db60d972993ec29755d11 /components/util | |
parent | 499d17f564d699e5e290e8a3859f64e7536827a7 (diff) | |
parent | e6b2715186b456b2d64fce20b95f2fa720d20300 (diff) | |
download | servo-65ee8166bd64e911502e29a050258b70d9f263aa.tar.gz servo-65ee8166bd64e911502e29a050258b70d9f263aa.zip |
auto merge of #4548 : Ms2ger/servo/cleanup, r=Manishearth
Diffstat (limited to 'components/util')
-rw-r--r-- | components/util/task.rs | 7 | ||||
-rw-r--r-- | components/util/workqueue.rs | 4 |
2 files changed, 3 insertions, 8 deletions
diff --git a/components/util/task.rs b/components/util/task.rs index 5907841e434..5de066d5823 100644 --- a/components/util/task.rs +++ b/components/util/task.rs @@ -16,17 +16,12 @@ pub fn spawn_named<S: IntoMaybeOwned<'static>>(name: S, f: proc():Send) { }); } -pub fn spawn_named_native<S: IntoMaybeOwned<'static>>(name: S, f: proc():Send) { - spawn_named(name, f) -} - /// Arrange to send a particular message to a channel if the task fails. pub fn spawn_named_with_send_on_failure<T: Send>(name: &'static str, state: task_state::TaskState, f: proc(): Send, msg: T, - dest: Sender<T>, - _native: bool) { + dest: Sender<T>) { let future_result = TaskBuilder::new().named(name).try_future(proc() { task_state::initialize(state); rtinstrument::instrument(f); diff --git a/components/util/workqueue.rs b/components/util/workqueue.rs index 8a224dd6e84..291ff40ca57 100644 --- a/components/util/workqueue.rs +++ b/components/util/workqueue.rs @@ -7,7 +7,7 @@ //! Data associated with queues is simply a pair of unsigned integers. It is expected that a //! higher-level API on top of this could allow safe fork-join parallelism. -use task::spawn_named_native; +use task::spawn_named; use task_state; use libc::funcs::posix88::unistd::usleep; @@ -248,7 +248,7 @@ impl<QueueData: Send, WorkData: Send> WorkQueue<QueueData, WorkData> { // Spawn threads. for (i, thread) in threads.into_iter().enumerate() { - spawn_named_native( + spawn_named( format!("{} worker {}/{}", task_name, i+1, thread_count), proc() { task_state::initialize(state | task_state::IN_WORKER); |