pub struct Control { /* private fields */ }Available on Windows only.
Expand description
Allows closing and awaiting exit of a Reactor.
Implementations§
Source§impl Control
impl Control
Sourcepub fn close(&self)
pub fn close(&self)
Stops accepting new Reactor::submit calls on every clone of the
corresponding Reactor.
Sourcepub fn join(self) -> Join ⓘ
pub fn join(self) -> Join ⓘ
Returns a future which awaits the reactor thread’s exit.
The reactor thread will not exit until all work completes and no more can be submitted. This
means that if close is not called first, this function implicitly waits for
every Reactor clone to be dropped in addition to all work completing. Join::close on
the returned join handle can be used to make a late-binding decision to close the reactor.
Auto Trait Implementations§
impl !RefUnwindSafe for Control
impl !UnwindSafe for Control
impl Freeze for Control
impl Send for Control
impl Sync for Control
impl Unpin for Control
impl UnsafeUnpin for Control
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more