Struct tokio_threadpool::Worker
[−]
[src]
pub struct Worker { /* fields omitted */ }
Thread worker
This is passed to the around_worker
callback set on Builder
. This
callback is only expected to call run
on it.
Methods
impl Worker
[src]
impl Worker
pub fn id(&self) -> &WorkerId
[src]
pub fn id(&self) -> &WorkerId
Returns a reference to the worker's identifier.
This identifier is unique scoped by the thread pool. It is possible that different thread pool instances share worker identifier values.
pub fn run(&self)
[src]
pub fn run(&self)
Run the worker
This function blocks until the worker is shutting down.
Trait Implementations
impl Debug for Worker
[src]
impl Debug for Worker
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Drop for Worker
[src]
impl Drop for Worker