Skip to content

Commit 5d2b8d4

Browse files
committed
std: Remove PlatformThread spawn mode. Obsolete
1 parent 85fd75a commit 5d2b8d4

File tree

3 files changed

+2
-66
lines changed

3 files changed

+2
-66
lines changed

src/libstd/task/mod.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,6 @@ pub enum SchedMode {
9696
CurrentScheduler,
9797
/// Run task on a specific scheduler
9898
ExistingScheduler(Scheduler),
99-
/**
100-
* Tasks are scheduled on the main OS thread
101-
*
102-
* The main OS thread is the thread used to launch the runtime which,
103-
* in most cases, is the process's initial thread as created by the OS.
104-
*/
105-
PlatformThread,
10699
/// All tasks run in the same OS thread
107100
SingleThreaded,
108101
}
@@ -1094,17 +1087,6 @@ fn test_avoid_copying_the_body_unlinked() {
10941087
}
10951088
}
10961089

1097-
#[test]
1098-
fn test_platform_thread() {
1099-
let (po, ch) = stream();
1100-
let mut builder = task();
1101-
builder.sched_mode(PlatformThread);
1102-
do builder.spawn {
1103-
ch.send(());
1104-
}
1105-
po.recv();
1106-
}
1107-
11081090
#[test]
11091091
#[ignore(cfg(windows))]
11101092
#[should_fail]

src/libstd/task/spawn.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ use local_data;
8484
use task::local_data_priv::{local_get, local_set, OldHandle};
8585
use task::rt::rust_task;
8686
use task::rt;
87-
use task::{Failure, PlatformThread, SchedOpts, SingleThreaded};
87+
use task::{Failure, SchedOpts, SingleThreaded};
8888
use task::{Success, TaskOpts, TaskResult};
8989
use task::{ExistingScheduler, SchedulerHandle};
9090
use task::unkillable;
@@ -808,16 +808,14 @@ fn spawn_raw_oldsched(mut opts: TaskOpts, f: ~fn()) {
808808
let num_threads = match opts.mode {
809809
DefaultScheduler
810810
| CurrentScheduler
811-
| ExistingScheduler(*)
812-
| PlatformThread => 0u, /* Won't be used */
811+
| ExistingScheduler(*) => 0u, /* Won't be used */
813812
SingleThreaded => 1u,
814813
};
815814

816815
unsafe {
817816
let sched_id = match opts.mode {
818817
CurrentScheduler => rt::rust_get_sched_id(),
819818
ExistingScheduler(SchedulerHandle(id)) => id,
820-
PlatformThread => rt::rust_osmain_sched_id(),
821819
_ => rt::rust_new_sched(num_threads)
822820
};
823821
rt::rust_new_task_in_sched(sched_id)

src/test/run-pass/platform_thread.rs

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)