sync: add Semaphore::is_closed (#3673)

This commit is contained in:
Michael P. Jung
2021-04-04 19:14:41 +02:00
committed by GitHub
parent b42f21ec3e
commit b05b9a1788
+5
View File
@@ -280,6 +280,11 @@ impl Semaphore {
pub fn close(&self) {
self.ll_sem.close();
}
/// Returns true if the semaphore is closed
pub fn is_closed(&self) -> bool {
self.ll_sem.is_closed()
}
}
impl<'a> SemaphorePermit<'a> {