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 limited timed wait to semaphore #21741

Closed
drewcrawford opened this issue Jan 29, 2015 · 1 comment
Closed

add limited timed wait to semaphore #21741

drewcrawford opened this issue Jan 29, 2015 · 1 comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@drewcrawford
Copy link
Contributor

I think Semaphore could use timeout variants of acquire and access, besides just blocking forever.

The underlying Condvar already has timeout support, so it's just a matter of bubbling it up to semaphore. Looking at sempahore.rs, it seems like low-hanging fruit to add.

I think the biggest question is whether it should be called acquire_timeout and access_timeout (following Condvar's wait_timeout) or whether it should be called try_acquire and try_access (following Mutex and RwLock).

If there's a decision rendered on the syntax, this would be a good feature for a new contributor.

@steveklabnik steveklabnik added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Feb 14, 2015
@steveklabnik
Copy link
Member

I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized.

This issue has been moved to the RFCs repo: rust-lang/rfcs#853

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

3 participants