pub struct Spawner { /* private fields */ }
Expand description
A wrapper for thread::spawn
that optionally auto-joins threads.
Implementations§
Source§impl Spawner
impl Spawner
Sourcepub fn spawn_collected<F>(&mut self, f: F)
pub fn spawn_collected<F>(&mut self, f: F)
Spawn a thread that will be auto-joined when the Spawner is dropped
The thread function should be a move closure returning ()
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Spawner
impl !RefUnwindSafe for Spawner
impl Send for Spawner
impl Sync for Spawner
impl Unpin for Spawner
impl !UnwindSafe for Spawner
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