[][src]Struct glib::ThreadPool

pub struct ThreadPool(_);

Methods

impl ThreadPool[src]

pub fn new_shared(max_threads: Option<u32>) -> Result<Self, Error>[src]

pub fn new_exclusive(max_threads: u32) -> Result<Self, Error>[src]

pub fn push<F: FnOnce() + Send + 'static>(&self, func: F) -> Result<(), Error>[src]

pub fn push_future<T: Send + 'static, F: FnOnce() -> T + Send + 'static>(
    &self,
    func: F
) -> Result<impl Future<Output = T>, Error>
[src]

pub fn set_max_threads(&self, max_threads: Option<u32>) -> Result<(), Error>[src]

pub fn get_max_threads(&self) -> Option<u32>[src]

pub fn get_num_threads(&self) -> u32[src]

pub fn get_unprocessed(&self) -> u32[src]

pub fn set_max_unused_threads(max_threads: Option<u32>)[src]

pub fn get_max_unused_threads() -> Option<u32>[src]

pub fn get_num_unused_threads() -> u32[src]

pub fn stop_unused_threads()[src]

pub fn set_max_idle_time(max_idle_time: u32)[src]

pub fn get_max_idle_time() -> u32[src]

Trait Implementations

impl Debug for ThreadPool[src]

impl Drop for ThreadPool[src]

impl Send for ThreadPool[src]

impl Sync for ThreadPool[src]

Auto Trait Implementations

impl RefUnwindSafe for ThreadPool

impl Unpin for ThreadPool

impl UnwindSafe for ThreadPool

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.