Lines Matching refs:semaphore
1 use crate::sync::batch_semaphore::{self as semaphore, TryAcquireError};
94 let semaphore = (semaphore::Semaphore::new(buffer), buffer); in channel() localVariable
95 let (tx, rx) = chan::channel(semaphore); in channel()
105 type Semaphore = (semaphore::Semaphore, usize);
451 match self.chan.semaphore().0.try_acquire(1) { in try_send()
627 match self.chan.semaphore().0.acquire(1).await { in reserve()
679 match self.chan.semaphore().0.try_acquire(1) { in try_reserve()
733 self.chan.semaphore().0.available_permits() in capacity()
802 let semaphore = self.chan.semaphore(); in drop() localVariable
805 semaphore.add_permit(); in drop()
807 if semaphore.is_closed() && semaphore.is_idle() { in drop()