core::rt: Remove redundant copy of run_in_newsched_task

This commit is contained in:
Brian Anderson 2013-04-20 01:37:59 -07:00
parent eac629bf5c
commit 1a7561be4d

View file

@ -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();
}
}