File tree 2 files changed +2
-13
lines changed
2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,6 @@ pub enum TaskResult {
86
86
pub enum SchedMode {
87
87
/// Run task on the default scheduler
88
88
DefaultScheduler ,
89
- /// Run task on the current scheduler
90
- CurrentScheduler ,
91
89
/// All tasks run in the same OS thread
92
90
SingleThreaded ,
93
91
}
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ use local_data;
84
84
use task:: local_data_priv:: { local_get, local_set, OldHandle } ;
85
85
use task:: rt:: rust_task;
86
86
use task:: rt;
87
- use task:: { Failure , SchedOpts , SingleThreaded } ;
87
+ use task:: { Failure , SchedOpts } ;
88
88
use task:: { Success , TaskOpts , TaskResult } ;
89
89
use task:: unkillable;
90
90
use to_bytes:: IterBytes ;
@@ -804,17 +804,8 @@ fn spawn_raw_oldsched(mut opts: TaskOpts, f: ~fn()) {
804
804
fail ! ( "foreign_stack_size scheduler option unimplemented" ) ;
805
805
}
806
806
807
- let num_threads = match opts. mode {
808
- DefaultScheduler
809
- | CurrentScheduler => 0 u, /* Won't be used */
810
- SingleThreaded => 1 u,
811
- } ;
812
-
813
807
unsafe {
814
- let sched_id = match opts. mode {
815
- CurrentScheduler => rt:: rust_get_sched_id ( ) ,
816
- _ => rt:: rust_new_sched ( num_threads)
817
- } ;
808
+ let sched_id = rt:: rust_new_sched ( 1 ) ;
818
809
rt:: rust_new_task_in_sched ( sched_id)
819
810
}
820
811
}
You can’t perform that action at this time.
0 commit comments