core::rt: Remove redundant copy of run_in_newsched_task
This commit is contained in:
parent
eac629bf5c
commit
1a7561be4d
1 changed files with 0 additions and 21 deletions
|
|
@ -164,24 +164,3 @@ fn test_context() {
|
|||
sched.run();
|
||||
}
|
||||
}
|
||||
|
||||
// For setting up tests of the new scheduler
|
||||
#[cfg(test)]
|
||||
pub fn run_in_newsched_task(f: ~fn()) {
|
||||
use cell::Cell;
|
||||
use unstable::run_in_bare_thread;
|
||||
use self::sched::Task;
|
||||
use self::uvio::UvEventLoop;
|
||||
|
||||
let f = Cell(Cell(f));
|
||||
|
||||
do run_in_bare_thread {
|
||||
let mut sched = ~UvEventLoop::new_scheduler();
|
||||
let f = f.take();
|
||||
let task = ~do Task::new(&mut sched.stack_pool) {
|
||||
(f.take())();
|
||||
};
|
||||
sched.task_queue.push_back(task);
|
||||
sched.run();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue