Avril 4 years ago
parent 411367f326
commit 300fcfd4d8
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -67,6 +67,7 @@ pub fn join_all<T>(i: impl IntoIterator<Item = JoinHandle<T>>)
} }
/// A pool container that ensures worker threads are waited on before termination. /// A pool container that ensures worker threads are waited on before termination.
#[derive(Debug)]
pub struct Pool(Vec<JoinHandle<()>>); pub struct Pool(Vec<JoinHandle<()>>);
impl Pool impl Pool
@ -77,7 +78,7 @@ impl Pool
drop(self) drop(self)
} }
/// Detach the pool and do not join its worker threads. /// Detach the pool but do not join its worker threads.
#[inline] pub fn detach(mut self) #[inline] pub fn detach(mut self)
{ {
self.0 = Vec::default(); self.0 = Vec::default();

Loading…
Cancel
Save