pub fn with_reactor<R, F>(r: &Box<dyn Reactor>, f: F) -> Rwhere F: FnOnce() -> R,
Sets the current reactor and runs the provided closure.
Panics if a reactor is already active on the current thread.