Struct keos::thread::ThreadBuilder
source · pub struct ThreadBuilder { /* private fields */ }
Expand description
A struct to build a new thread.
Implementations§
source§impl ThreadBuilder
impl ThreadBuilder
sourcepub fn new<I>(name: I) -> Selfwhere
String: From<I>,
pub fn new<I>(name: I) -> Selfwhere String: From<I>,
Create a new thread builder for thread name
.
sourcepub fn spawn_as_parked<F: FnOnce() + Send + 'static>(
self,
thread_fn: F
) -> ParkHandle
pub fn spawn_as_parked<F: FnOnce() + Send + 'static>( self, thread_fn: F ) -> ParkHandle
Spawn the thread as a parked state.
sourcepub fn spawn<F: FnOnce() + Send + 'static>(self, thread_fn: F) -> JoinHandle
pub fn spawn<F: FnOnce() + Send + 'static>(self, thread_fn: F) -> JoinHandle
Spawn the thread.
Auto Trait Implementations§
impl RefUnwindSafe for ThreadBuilder
impl !Send for ThreadBuilder
impl !Sync for ThreadBuilder
impl Unpin for ThreadBuilder
impl UnwindSafe for ThreadBuilder
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
const: unstable§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more