Skip to main content

with_reactor

Function with_reactor 

Source
pub fn with_reactor<R, F>(r: &Box<dyn Reactor>, f: F) -> R
where F: FnOnce() -> R,
Expand description

Sets the current reactor and runs the provided closure.

ยงPanics

Panics if a reactor is already active on the current thread.