melib: add async blocking join
parent
47481e72da
commit
eda76c744e
|
@ -125,4 +125,8 @@ impl<T> Async<T> {
|
||||||
self.value = Some(v);
|
self.value = Some(v);
|
||||||
Ok(AsyncStatus::Finished)
|
Ok(AsyncStatus::Finished)
|
||||||
}
|
}
|
||||||
|
/// Blocks until thread joins.
|
||||||
|
pub fn join(mut self) -> T {
|
||||||
|
self.worker.take().unwrap().join().unwrap()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue