pub fn with_scheduler<F>( f: F, sched: Box<dyn Scheduler>, ) -> Option<Box<dyn Scheduler>>where F: FnOnce(),
Call the suppled closure using the supplied schedulee