Struct minion::Handle [−][src]
pub struct Handle<E> { /* fields omitted */ }
Expand description
A handle to a running service loop.
You can use it to cancel the running loop at the next opportunity (through [Handle::cancel
]),
or to wait for the loop to terminate (through Handle::wait
). You can also use
Handle::canceller
to get a Canceller
handle, which lets you terminate the service loop
elsewhere (e.g., while waiting).
Implementations
Get another handle for cancelling the service loop.
This can be handy if you want one thread to wait for the service loop to exit, while another watches for exit signals.
Methods from Deref<Target = Canceller>
Cancel the currently running service loop. This method does not block; it sends a signal that the service loop should cease execution and returns immediately.
Note that this will not interrupt a currently executing Cancellable::for_each
.
Instead, the next time Cancellable::for_each
would be called, the service loop will
return.
Trait Implementations
Auto Trait Implementations
impl<E> !RefUnwindSafe for Handle<E>
impl<E> !UnwindSafe for Handle<E>