Struct glib::ThreadPool
source · [−]pub struct ThreadPool(_);
Implementations
sourceimpl ThreadPool
impl ThreadPool
pub fn exclusive(max_threads: u32) -> Result<Self, Error>
pub fn push<F: FnOnce() + Send + 'static>(&self, func: F) -> Result<(), Error>
pub fn push_future<T: Send + 'static, F: FnOnce() -> T + Send + 'static>(
&self,
func: F
) -> Result<impl Future<Output = T> + Send + Sync + 'static, Error>
pub fn set_max_threads(&self, max_threads: Option<u32>) -> Result<(), Error>
pub fn max_threads(&self) -> Option<u32>
pub fn num_threads(&self) -> u32
pub fn unprocessed(&self) -> u32
pub fn set_max_unused_threads(max_threads: Option<u32>)
pub fn max_unused_threads() -> Option<u32>
pub fn num_unused_threads() -> u32
pub fn stop_unused_threads()
pub fn set_max_idle_time(max_idle_time: u32)
pub fn max_idle_time() -> u32
Trait Implementations
sourceimpl Debug for ThreadPool
impl Debug for ThreadPool
sourceimpl Drop for ThreadPool
impl Drop for ThreadPool
impl Send for ThreadPool
impl Sync for ThreadPool
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more