Struct message_io::node::NodeTask [−][src]
pub struct NodeTask { /* fields omitted */ }
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
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.