Struct entangled::ThreadPoolDescriptor [−][src]
Describes how a ThreadPool
should be created.
Fields
num_threads: usize
Spawns at most n threads for the thread pool. Default: 2.
stack_size: usize
The stack size of the spawned threads. Default: 2 MiB.
thread_name: String
Name of the threads. Threads will be named: {thread_name} ({thread index}), i.e. “Thread pool (0)” Default: “Thread pool”
start_handler: Option<Box<dyn Fn(usize) + Send + Sync>>
Closure invoked on worker thread start. Closure parameter contains the index of the created thread. Default: None
exit_handler: Option<Box<dyn Fn(usize) + Send + Sync>>
Closure invoked on worker thread exit. Closure parameter contains the index of the created thread. Default: None
Trait Implementations
impl Default for ThreadPoolDescriptor
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ThreadPoolDescriptor
impl Send for ThreadPoolDescriptor
impl Sync for ThreadPoolDescriptor
impl Unpin for ThreadPoolDescriptor
impl !UnwindSafe for ThreadPoolDescriptor
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,