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