@@ -79,7 +79,7 @@ pub struct Scheduler {
7979 /// A fast XorShift rng for scheduler use
8080 rng : XorShiftRng ,
8181 /// A togglable idle callback
82- idle_callback : Option < ~PausableIdleCallback > ,
82+ idle_callback : Option < ~PausableIdleCallback : Send > ,
8383 /// A countdown that starts at a random value and is decremented
8484 /// every time a yield check is performed. When it hits 0 a task
8585 /// will yield.
@@ -99,7 +99,7 @@ pub struct Scheduler {
9999 // destroyed before it's actually destroyed.
100100
101101 /// The event loop used to drive the scheduler and perform I/O
102- event_loop : ~EventLoop ,
102+ event_loop : ~EventLoop : Send ,
103103}
104104
105105/// An indication of how hard to work on a given operation, the difference
@@ -122,7 +122,7 @@ impl Scheduler {
122122 // * Initialization Functions
123123
124124 pub fn new ( pool_id : uint ,
125- event_loop : ~EventLoop ,
125+ event_loop : ~EventLoop : Send ,
126126 work_queue : deque:: Worker < ~GreenTask > ,
127127 work_queues : ~[ deque:: Stealer < ~GreenTask > ] ,
128128 sleeper_list : SleeperList ,
@@ -135,7 +135,7 @@ impl Scheduler {
135135 }
136136
137137 pub fn new_special ( pool_id : uint ,
138- event_loop : ~EventLoop ,
138+ event_loop : ~EventLoop : Send ,
139139 work_queue : deque:: Worker < ~GreenTask > ,
140140 work_queues : ~[ deque:: Stealer < ~GreenTask > ] ,
141141 sleeper_list : SleeperList ,
@@ -182,7 +182,7 @@ impl Scheduler {
182182 pub fn bootstrap ( mut ~self ) {
183183
184184 // Build an Idle callback.
185- let cb = ~SchedRunner as ~Callback ;
185+ let cb = ~SchedRunner as ~Callback : Send ;
186186 self . idle_callback = Some ( self . event_loop . pausable_idle_callback ( cb) ) ;
187187
188188 // Create a task for the scheduler with an empty context.
@@ -230,7 +230,7 @@ impl Scheduler {
230230 // mutable reference to the event_loop to give it the "run"
231231 // command.
232232 unsafe {
233- let event_loop: * mut ~EventLoop = & mut self . event_loop ;
233+ let event_loop: * mut ~EventLoop : Send = & mut self . event_loop ;
234234 // Our scheduler must be in the task before the event loop
235235 // is started.
236236 stask. put_with_sched ( self ) ;
@@ -868,7 +868,7 @@ impl Scheduler {
868868 }
869869
870870 pub fn make_handle ( & mut self ) -> SchedHandle {
871- let remote = self . event_loop . remote_callback ( ~SchedRunner as ~ Callback ) ;
871+ let remote = self . event_loop . remote_callback ( ~SchedRunner ) ;
872872
873873 return SchedHandle {
874874 remote : remote,
@@ -893,7 +893,7 @@ pub enum SchedMessage {
893893}
894894
895895pub struct SchedHandle {
896- priv remote : ~RemoteCallback ,
896+ priv remote : ~RemoteCallback : Send ,
897897 priv queue : msgq:: Producer < SchedMessage > ,
898898 sched_id : uint
899899}
@@ -1007,7 +1007,6 @@ mod test {
10071007
10081008 use std:: comm;
10091009 use std:: task:: TaskOpts ;
1010- use std:: rt:: Runtime ;
10111010 use std:: rt:: task:: Task ;
10121011 use std:: rt:: local:: Local ;
10131012
@@ -1034,7 +1033,7 @@ mod test {
10341033 match task. get ( ) . maybe_take_runtime :: < GreenTask > ( ) {
10351034 Some ( green) => {
10361035 let ret = green. sched . get_ref ( ) . sched_id ( ) ;
1037- task. get ( ) . put_runtime ( green as ~ Runtime ) ;
1036+ task. get ( ) . put_runtime ( green) ;
10381037 return ret;
10391038 }
10401039 None => fail ! ( )
0 commit comments