struct Inner {
shared: Mutex<Shared>,
condvar: Condvar,
thread_name: Arc<dyn Fn() -> String + Send + Sync + 'static>,
stack_size: Option<usize>,
after_start: Option<Arc<dyn Fn() + Send + Sync>>,
before_stop: Option<Arc<dyn Fn() + Send + Sync>>,
thread_cap: usize,
keep_alive: Duration,
metrics: SpawnerMetrics,
}Fields§
State shared between worker threads.
condvar: CondvarPool threads wait on this.
thread_name: Arc<dyn Fn() -> String + Send + Sync + 'static>Spawned threads use this name.
stack_size: Option<usize>Spawned thread stack size.
after_start: Option<Arc<dyn Fn() + Send + Sync>>Call after a thread starts.
before_stop: Option<Arc<dyn Fn() + Send + Sync>>Call before a thread stops.
thread_cap: usize§keep_alive: Duration§metrics: SpawnerMetricsImplementations§
Auto Trait Implementations§
impl !Freeze for Inner
impl !RefUnwindSafe for Inner
impl Send for Inner
impl Sync for Inner
impl Unpin for Inner
impl !UnwindSafe for Inner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more