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
Auto Trait Implementations§
impl Freeze for ThreadConfig
impl RefUnwindSafe for ThreadConfig
impl Send for ThreadConfig
impl Sync for ThreadConfig
impl Unpin for ThreadConfig
impl UnwindSafe for ThreadConfig
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