Struct poolite::Pool
[−]
[src]
pub struct Pool { /* fields omitted */ }
The Pool
struct
Methods
impl Pool
[src]
fn new() -> Result<Self, PoolError>
[src]
fn with_builder(b: Builder) -> Result<Self, PoolError>
[src]
fn as_builder(&self) -> &Builder
[src]
Get Pool
's settings
fn is_empty(&self) -> bool
[src]
All threads are waiting and tasks_queue'length is 0.
fn tasks_len(&self) -> usize
[src]
Returns the length of the tasks_queue.
fn threads_future(&self) -> usize
[src]
Contains the number of ready to create
fn threads_alive(&self) -> usize
[src]
Returns the number of threads in the Pool.
fn threads_waiting(&self) -> usize
[src]
Returns the number of threads that is waiting for Task in the Pool
fn daemon_alive(&self) -> bool
[src]
The daemon thread's status
fn push<T>(&self, task: T) where
T: Runable + Send + 'static,
[src]
T: Runable + Send + 'static,
Appends a task to the Pool,
it receives Fn() + Send + 'static,FnMut() + Send + 'static
and FnOnce() + Send + 'static>
.
fn add_threads(&self, add_num: usize) -> Result<(), (usize, Error)>
[src]
Manually add the number of threads to Pool
fn join(&self)
[src]
wait for the pool
impl Pool
[src]
fn scoped<'pool, 'scope, Scheduler>(&'pool self, scheduler: Scheduler) where
Scheduler: FnOnce(&Scoped<'pool, 'scope>),
[src]
Scheduler: FnOnce(&Scoped<'pool, 'scope>),