Struct message_io::node::NodeTask
source · [−]pub struct NodeTask { /* private fields */ }
Expand description
Entity used to ensure the lifetime of NodeListener::for_each_async()
call.
The node will process events asynchronously while this entity lives.
The destruction of this entity will block until the task is finished.
If you want to “unblock” the thread that drops this entity call to
NodeHandler::stop()
before or from another thread.
Implementations
sourceimpl NodeTask
impl NodeTask
sourcepub fn wait(&mut self)
pub fn wait(&mut self)
Block the current thread until the task finalizes.
Similar to call drop(node_task)
but more verbose and without take the ownership.
To finalize the task call NodeHandler::stop()
.
Calling wait()
over an already finished task do not block.
Auto Trait Implementations
impl !RefUnwindSafe for NodeTask
impl Send for NodeTask
impl Sync for NodeTask
impl Unpin for NodeTask
impl !UnwindSafe for NodeTask
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more