Struct druid::piet::cairo::glib::ThreadPool
pub struct ThreadPool(_);
Implementations§
§impl ThreadPool
impl ThreadPool
pub fn exclusive(max_threads: u32) -> Result<ThreadPool, Error>
pub fn push<F>(&self, func: F) -> Result<(), Error>where F: FnOnce() + Send + 'static,
pub fn push_future<T, F>( &self, func: F ) -> Result<impl Future<Output = T> + Send + Sync + 'static, Error>where T: Send + 'static, F: FnOnce() -> T + Send + 'static,
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§
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.