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
This issue was labelled with: A-libs, A-threads, I-enhancement in the Rust repository
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:
Thursday Jan 29, 2015 at 08:18 GMT
For earlier discussion, see rust-lang/rust#21741
This issue was labelled with: A-libs, A-threads, I-enhancement in the Rust repository
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: