[−][src]Struct loom::thread::Builder
Thread factory, which can be used in order to configure the properties of a new thread.
Methods
impl Builder[src]
pub fn new() -> Builder[src]
Generates the base configuration for spawning a thread, from which configuration methods can be chained.
pub fn name(self, _name: String) -> Builder[src]
Names the thread-to-be. Currently the name is used for identification only in panic messages.
pub fn stack_size(self, _size: usize) -> Builder[src]
Sets the size of the stack (in bytes) for the new thread.
pub fn spawn<F, T>(self, f: F) -> Result<JoinHandle<T>> where
F: FnOnce() -> T,
F: Send + 'static,
T: Send + 'static, [src]
F: FnOnce() -> T,
F: Send + 'static,
T: Send + 'static,
Spawns a new thread by taking ownership of the Builder, and returns an
io::Result to its JoinHandle.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,