Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add acquire_owned_many for Semaphore #3567

Closed
staticgc opened this issue Mar 1, 2021 · 1 comment
Closed

Add acquire_owned_many for Semaphore #3567

staticgc opened this issue Mar 1, 2021 · 1 comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-sync Module: tokio/sync

Comments

@staticgc
Copy link

staticgc commented Mar 1, 2021

The semaphore has non-owned version of acquiring many permits.

Proposal: A similar owned version to acquire many permits

pub async fn acquire_owned_many(self: Arc<Self>, n: u32) -> Result<OwnedSemaphorePermit, AcquireError> {}

Similarly to add a try version of the above function.

Happy to raise a PR for this!

@staticgc staticgc added A-tokio Area: The main tokio crate C-feature-request Category: A feature request. labels Mar 1, 2021
@Darksonn Darksonn added the M-sync Module: tokio/sync label Mar 1, 2021
@Darksonn
Copy link
Contributor

Darksonn commented Mar 1, 2021

Please see #3535.

@Darksonn Darksonn closed this as completed Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-feature-request Category: A feature request. M-sync Module: tokio/sync
Projects
None yet
Development

No branches or pull requests

2 participants