/// Acquire a certain amount of permits on a semaphore asynchronously.
///
/// This method returns a future that will resolve once the given amount of
/// permits have been acquired.
/// The Future will resolve to a [`GenericSharedSemaphoreReleaser`], which will
/// release all acquired permits automatically when dropped.
Acquire a certain amount of permits on a semaphore asynchronously.
This method returns a future that will resolve once the given amount of
permits have been acquired.
The Future will resolve to a [`GenericSharedSemaphoreReleaser`], which will
release all acquired permits automatically when dropped.
Acquire a certain amount of permits on a semaphore asynchronously . This method returns a future that will resolve once the given amount of permits have been acquired . The Future will resolve to a [ ` GenericSharedSemaphoreReleaser ` ] which will release all acquired permits automatically when dropped .
pub fn acquire(
            &self,
            nr_permits: usize,
        ) -> GenericSharedSemaphoreAcquireFuture<MutexType> {
            GenericSharedSemaphoreAcquireFuture::<MutexType> {
                semaphore: Some(self.clone()),
                wait_node: ListNode::new(WaitQueueEntry::new(nr_permits)),
                auto_release: true,
            }
        }
pub fn acquire ( & self , nr_permits : usize , ) -> GenericSharedSemaphoreAcquireFuture < MutexType > { GenericSharedSemaphoreAcquireFuture :: < MutexType > { semaphore : Some ( self . clone ( ) ) , wait_node : ListNode :: new ( WaitQueueEntry :: new ( nr_permits ) ) , auto_release : true , } }
Acquire a certain amount of permits on a semaphore asynchronously.
Acquire a certain amount of permits on a semaphore asynchronously .
&self
nr_permits
usize