File tree Expand file tree Collapse file tree 3 files changed +3
-20
lines changed Expand file tree Collapse file tree 3 files changed +3
-20
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ pub trait EventLoop {
28
28
fn run ( & mut self ) ;
29
29
fn callback ( & mut self , ~fn ( ) ) ;
30
30
fn pausible_idle_callback ( & mut self ) -> ~PausibleIdleCallback ;
31
- fn callback_ms ( & mut self , ms : u64 , ~fn ( ) ) ;
32
31
fn remote_callback ( & mut self , ~fn ( ) ) -> ~RemoteCallback ;
33
32
34
33
/// The asynchronous I/O services. Not all event loops may provide one
Original file line number Diff line number Diff line change @@ -1147,22 +1147,15 @@ mod test {
1147
1147
1148
1148
#[ test]
1149
1149
fn test_io_callback ( ) {
1150
+ use rt:: io:: timer;
1151
+
1150
1152
// This is a regression test that when there are no schedulable tasks
1151
1153
// in the work queue, but we are performing I/O, that once we do put
1152
1154
// something in the work queue again the scheduler picks it up and doesn't
1153
1155
// exit before emptying the work queue
1154
1156
do run_in_newsched_task {
1155
1157
do spawntask {
1156
- let sched: ~Scheduler = Local :: take ( ) ;
1157
- do sched. deschedule_running_task_and_then |sched, task| {
1158
- let task = Cell :: new ( task) ;
1159
- do sched. event_loop . callback_ms ( 10 ) {
1160
- rtdebug ! ( "in callback" ) ;
1161
- let mut sched: ~Scheduler = Local :: take ( ) ;
1162
- sched. enqueue_blocked_task ( task. take ( ) ) ;
1163
- Local :: put ( sched) ;
1164
- }
1165
- }
1158
+ timer : : sleep ( 10 ) ;
1166
1159
}
1167
1160
}
1168
1161
}
Original file line number Diff line number Diff line change @@ -222,15 +222,6 @@ impl EventLoop for UvEventLoop {
222
222
} as ~PausibleIdleCallback
223
223
}
224
224
225
- fn callback_ms ( & mut self , ms : u64 , f : ~fn ( ) ) {
226
- let mut timer = TimerWatcher :: new ( self . uvio . uv_loop ( ) ) ;
227
- do timer. start ( ms, 0 ) |timer, status| {
228
- assert ! ( status. is_none( ) ) ;
229
- timer. close ( ||( ) ) ;
230
- f ( ) ;
231
- }
232
- }
233
-
234
225
fn remote_callback ( & mut self , f : ~fn ( ) ) -> ~RemoteCallback {
235
226
~UvRemoteCallback :: new ( self . uvio . uv_loop ( ) , f) as ~RemoteCallback
236
227
}
You can’t perform that action at this time.
0 commit comments