/// 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 [`GenericSemaphoreReleaser`], 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 [`GenericSemaphoreReleaser`], 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 [ ` GenericSemaphoreReleaser ` ] which will release all acquired permits automatically when dropped .
pub fn acquire(
        &self,
        nr_permits: usize,
    ) -> GenericSemaphoreAcquireFuture<'_, MutexType> {
        GenericSemaphoreAcquireFuture::<MutexType> {
            semaphore: Some(&self),
            wait_node: ListNode::new(WaitQueueEntry::new(nr_permits)),
            auto_release: true,
        }
    }
pub fn acquire ( & self , nr_permits : usize , ) -> GenericSemaphoreAcquireFuture < ' _ , MutexType > { GenericSemaphoreAcquireFuture :: < MutexType > { semaphore : Some ( & self ) , 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