Struct mio_pool::PoolHandle [] [src]

pub struct PoolHandle<R> { /* fields omitted */ }

A handle to a currently executing mio pool.

This handle can be used to terminate the running pool, and to wait for its completion. See PoolHandle::terminate and PoolHandle::wait for details.

Methods

impl<R> PoolHandle<R>
[src]

[src]

Tell all running workers to terminate, and then wait for their completion.

Note that this will not wait for existing connections to terminate, but termination may be delayed until the next time each worker is idle.

[src]

Stop accepting connections and wait for existing connections to complete.

This method will tell worker threads not to accept new connetions, and to exit once all current connections have been closed.

Note that this method will not immediately drop the Listener, so new clients that try to connect will hang (i.e., not get a connection refused) until the workers have all exited.

[src]

Wait for all running workers to terminate.

This method will not tell worker threads to exit, and so will only return once when all worker threads have crashed (which should not happen in general). Users may instead want to use PoolHandle::terminate.