mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-26 00:00:16 +02:00
sync: add Semaphore::is_closed (#3673)
This commit is contained in:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user