pub struct TerminableThreadsBuilder<T, const N: usize> { /* private fields */ }Expand description
Basic builder for a terminable thread object
The builder is necessary to provide the termination flag (Arc<AtomicBool>)
for threads, that are later provided to the builder, to use.
Implementations§
Source§impl<T, const N: usize> TerminableThreadsBuilder<T, N>
 
impl<T, const N: usize> TerminableThreadsBuilder<T, N>
Sourcepub fn new() -> (Self, Arc<AtomicBool>)
 
pub fn new() -> (Self, Arc<AtomicBool>)
Create a new TeminableThreadBuilder
Sourcepub fn build_with_threads(
    self,
    threads: [JoinHandle<T>; N],
) -> TerminableThreads<T, N>
 
pub fn build_with_threads( self, threads: [JoinHandle<T>; N], ) -> TerminableThreads<T, N>
Transform the builder into a TerminableThreads<T, N> struct with the specified threads
Trait Implementations§
Auto Trait Implementations§
impl<T, const N: usize> Freeze for TerminableThreadsBuilder<T, N>
impl<T, const N: usize> RefUnwindSafe for TerminableThreadsBuilder<T, N>where
    T: RefUnwindSafe,
impl<T, const N: usize> Send for TerminableThreadsBuilder<T, N>where
    T: Send,
impl<T, const N: usize> Sync for TerminableThreadsBuilder<T, N>where
    T: Sync,
impl<T, const N: usize> Unpin for TerminableThreadsBuilder<T, N>where
    T: Unpin,
impl<T, const N: usize> UnwindSafe for TerminableThreadsBuilder<T, N>where
    T: UnwindSafe,
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