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.