Struct scheduled_thread_pool::builder::FinalStage
source · pub struct FinalStage<'a> { /* private fields */ }
Expand description
The final builder stage, allowing configuration of optional paramters.
Implementations§
source§impl<'a> FinalStage<'a>
impl<'a> FinalStage<'a>
sourcepub fn thread_name_pattern(self, thread_name_pattern: &'a str) -> Self
pub fn thread_name_pattern(self, thread_name_pattern: &'a str) -> Self
Sets the pattern to be used when naming threads created to be part of the pool.
The substring {}
in the name will be replaced with an integer
identifier of the thread.
Defaults to None
.
sourcepub fn on_drop_behavior(self, on_drop_behavior: OnPoolDropBehavior) -> Self
pub fn on_drop_behavior(self, on_drop_behavior: OnPoolDropBehavior) -> Self
Sets the behavior for what to do with pending scheduled executions when the pool is dropped.
Defaults to OnPoolDropBehavior::CompletePendingScheduled.
sourcepub fn build(self) -> ScheduledThreadPool
pub fn build(self) -> ScheduledThreadPool
Consumes the builder, returning the constructed thread pool.
Auto Trait Implementations§
impl<'a> RefUnwindSafe for FinalStage<'a>
impl<'a> Send for FinalStage<'a>
impl<'a> Sync for FinalStage<'a>
impl<'a> Unpin for FinalStage<'a>
impl<'a> UnwindSafe for FinalStage<'a>
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