Created
July 22, 2013 20:43
-
-
Save bblum/6057504 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn deschedule_running_task_and_then_inner(~self, fn(&mut Scheduler, Task)); // does not BlockedTask::try_block() the task | |
fn deschedule_running_task_and_then(~self, user_blk: fn(&mut Scheduler, BlockedTask) { | |
do self.deschedule_running_task_and_then_inner |sched, task| { | |
// remove this logic from fn run_cleanup_job() now that it will be here | |
match BlockedTask::try_block(task) { | |
Left(killed_task) => sched.enqueue_task(killed_task), | |
Right(blocked_task) => user_blk(sched, blocked_task), | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment