Struct threads_pool::scheduler::ThreadPool [−][src]
pub struct ThreadPool { /* fields omitted */ }
Methods
impl ThreadPool
[src]
impl ThreadPool
pub fn new(size: usize) -> ThreadPool
[src]
pub fn new(size: usize) -> ThreadPool
pub fn execute<F: FnOnce() + Send + 'static>(&self, f: F)
[src]
pub fn execute<F: FnOnce() + Send + 'static>(&self, f: F)
pub fn execute_automode<F: FnOnce() + Send + 'static>(&mut self, f: F)
[src]
pub fn execute_automode<F: FnOnce() + Send + 'static>(&mut self, f: F)
Trait Implementations
impl PoolManager for ThreadPool
[src]
impl PoolManager for ThreadPool
fn extend(&mut self, more: usize)
[src]
fn extend(&mut self, more: usize)
fn shrink(&mut self, less: usize)
[src]
fn shrink(&mut self, less: usize)
fn resize(&mut self, total: usize)
[src]
fn resize(&mut self, total: usize)
fn auto_adjust(&mut self)
[src]
fn auto_adjust(&mut self)
fn kill_worker(&mut self, id: usize)
[src]
fn kill_worker(&mut self, id: usize)
fn clear(&mut self)
[src]
fn clear(&mut self)
impl PoolState for ThreadPool
[src]
impl PoolState for ThreadPool
fn get_size(&self) -> usize
[src]
fn get_size(&self) -> usize
fn get_queue_length(&self) -> Result<usize, &'static str>
[src]
fn get_queue_length(&self) -> Result<usize, &'static str>
fn get_queue_size_threshold(&self) -> usize
[src]
fn get_queue_size_threshold(&self) -> usize
fn set_queue_size_threshold(&mut self, threshold: usize)
[src]
fn set_queue_size_threshold(&mut self, threshold: usize)
fn get_first_worker_id(&self) -> Option<usize>
[src]
fn get_first_worker_id(&self) -> Option<usize>
fn get_last_worker_id(&self) -> Option<usize>
[src]
fn get_last_worker_id(&self) -> Option<usize>
fn get_next_worker_id(&self, current_id: usize) -> Option<usize>
[src]
fn get_next_worker_id(&self, current_id: usize) -> Option<usize>
impl Drop for ThreadPool
[src]
impl Drop for ThreadPool
Auto Trait Implementations
impl Send for ThreadPool
impl Send for ThreadPool
impl Sync for ThreadPool
impl Sync for ThreadPool