Function swap_scheduler

Source
pub fn swap_scheduler(sched: Box<dyn Scheduler>) -> Option<Box<dyn Scheduler>>
Expand description

Replace the current Scheduler with your own supplied scheduler. all wait() commands will be run through this scheduler now.

This will return the current TLS scheduler, which may be useful to restore it later.