You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
I think Semaphore could use timeout variants of
acquire
andaccess
, 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
andaccess_timeout
(following Condvar'swait_timeout
) or whether it should be calledtry_acquire
andtry_access
(following Mutex and RwLock).If there's a decision rendered on the syntax, this would be a good feature for a new contributor.
The text was updated successfully, but these errors were encountered: