Remove spawn_named_native.

All threads are native now, so this was just an alias for spawn_named.
This commit is contained in:
Ms2ger 2015-01-05 09:20:40 +01:00
parent c4e44b568a
commit e6b2715186
3 changed files with 4 additions and 9 deletions

View file

@ -23,7 +23,7 @@ use script_task::{ScriptTask, ScriptChan, ScriptMsg, TimerSource};
use script_task::StackRootTLS;
use servo_net::resource_task::{ResourceTask, load_whole_resource};
use servo_util::task::spawn_named_native;
use servo_util::task::spawn_named;
use servo_util::task_state;
use servo_util::task_state::{SCRIPT, IN_WORKER};
@ -135,8 +135,7 @@ impl DedicatedWorkerGlobalScope {
parent_sender: Box<ScriptChan+Send>,
own_sender: Sender<(TrustedWorkerAddress, ScriptMsg)>,
receiver: Receiver<(TrustedWorkerAddress, ScriptMsg)>) {
spawn_named_native(format!("WebWorker for {}", worker_url.serialize()), proc() {
spawn_named(format!("WebWorker for {}", worker_url.serialize()), proc() {
task_state::initialize(SCRIPT | IN_WORKER);
let roots = RootCollection::new();

View file

@ -16,10 +16,6 @@ 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,

View file

@ -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);