File tree 2 files changed +2
-17
lines changed
2 files changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ use result::Result;
44
44
use result;
45
45
use rt:: { context, OldTaskContext , TaskContext } ;
46
46
use rt:: local:: Local ;
47
- use task:: rt:: { task_id, sched_id } ;
47
+ use task:: rt:: task_id;
48
48
use unstable:: finally:: Finally ;
49
49
use util;
50
50
@@ -58,12 +58,6 @@ mod local_data_priv;
58
58
pub mod rt;
59
59
pub mod spawn;
60
60
61
- /// A handle to a scheduler
62
- #[ deriving( Eq ) ]
63
- pub enum Scheduler {
64
- SchedulerHandle ( sched_id )
65
- }
66
-
67
61
/// A handle to a task
68
62
#[ deriving( Eq ) ]
69
63
pub enum Task {
@@ -94,8 +88,6 @@ pub enum SchedMode {
94
88
DefaultScheduler ,
95
89
/// Run task on the current scheduler
96
90
CurrentScheduler ,
97
- /// Run task on a specific scheduler
98
- ExistingScheduler ( Scheduler ) ,
99
91
/// All tasks run in the same OS thread
100
92
SingleThreaded ,
101
93
}
@@ -588,10 +580,6 @@ pub fn get_task() -> Task {
588
580
}
589
581
}
590
582
591
- pub fn get_scheduler ( ) -> Scheduler {
592
- SchedulerHandle ( unsafe { rt:: rust_get_sched_id ( ) } )
593
- }
594
-
595
583
/**
596
584
* Temporarily make the task unkillable
597
585
*
Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ use task::rt::rust_task;
86
86
use task:: rt;
87
87
use task:: { Failure , SchedOpts , SingleThreaded } ;
88
88
use task:: { Success , TaskOpts , TaskResult } ;
89
- use task:: { ExistingScheduler , SchedulerHandle } ;
90
89
use task:: unkillable;
91
90
use to_bytes:: IterBytes ;
92
91
use uint;
@@ -807,15 +806,13 @@ fn spawn_raw_oldsched(mut opts: TaskOpts, f: ~fn()) {
807
806
808
807
let num_threads = match opts. mode {
809
808
DefaultScheduler
810
- | CurrentScheduler
811
- | ExistingScheduler ( * ) => 0 u, /* Won't be used */
809
+ | CurrentScheduler => 0 u, /* Won't be used */
812
810
SingleThreaded => 1 u,
813
811
} ;
814
812
815
813
unsafe {
816
814
let sched_id = match opts. mode {
817
815
CurrentScheduler => rt:: rust_get_sched_id ( ) ,
818
- ExistingScheduler ( SchedulerHandle ( id) ) => id,
819
816
_ => rt:: rust_new_sched ( num_threads)
820
817
} ;
821
818
rt:: rust_new_task_in_sched ( sched_id)
You can’t perform that action at this time.
0 commit comments