Struct scoped_thread_pool::ThreadConfig
source · pub struct ThreadConfig { /* private fields */ }Expand description
Thread configuration. Provides detailed control over the properties and behavior of new threads.
Implementations§
source§impl ThreadConfig
impl ThreadConfig
sourcepub fn new() -> ThreadConfig
pub fn new() -> ThreadConfig
Generates the base configuration for spawning a thread, from which configuration methods can be chained.
sourcepub fn prefix<S: Into<String>>(self, prefix: S) -> ThreadConfig
pub fn prefix<S: Into<String>>(self, prefix: S) -> ThreadConfig
Name prefix of spawned threads. Thread number will be appended to this prefix to form each thread’s unique name. Currently the name is used for identification only in panic messages.
sourcepub fn stack_size(self, stack_size: usize) -> ThreadConfig
pub fn stack_size(self, stack_size: usize) -> ThreadConfig
Sets the size of the stack for the new thread.
Trait Implementations§
source§impl Default for ThreadConfig
impl Default for ThreadConfig
source§fn default() -> ThreadConfig
fn default() -> ThreadConfig
Returns the “default value” for a type. Read more