-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 recv_timeout to std::sync::mpsc #962
Labels
T-libs-api
Relevant to the library API team, which will review and decide on the RFC.
Comments
Any progress on this in the last year? Would you accept a PR for it? |
emilio
added a commit
to emilio/servo
that referenced
this issue
May 19, 2016
This approach uses a secondary thread to manage the timeout + select. This is not ideal, but it can be vastly improved if something is done about rust-lang/rfcs#962. The other apparently cleaner option, having the returned value not being an ipc-sender, but a struct containing the sender and the Thread handle (which would allow unparking), wouldn't work across IPC.
emilio
added a commit
to emilio/servo
that referenced
this issue
May 19, 2016
This approach uses a secondary thread to manage the timeout + select. This is not ideal, but it can be vastly improved if something is done about rust-lang/rfcs#962. The other apparently cleaner option, having the returned value not being an ipc-sender, but a struct containing the sender and the Thread handle (which would allow unparking), wouldn't work across IPC.
emilio
added a commit
to emilio/servo
that referenced
this issue
May 19, 2016
This approach uses a secondary thread to manage the timeout + select. This is not ideal, but it can be vastly improved if something is done about rust-lang/rfcs#962. The other apparently cleaner option, having the returned value not being an ipc-sender, but a struct containing the sender and the Thread handle (which would allow unparking), wouldn't work across IPC.
5 tasks
bors
added a commit
to rust-lang/rust
that referenced
this issue
Jun 22, 2016
std: sync: Implement recv_timeout() This is an attempt to implement rust-lang/rfcs#962. I'm not sure about if a change like this would require an rfc or something like that, and this surely needs a lot more testing, but I wanted to take some eyes on it before following. cc @metajack @asajeffrey servo/servo#11279 servo/servo#11283 r? @aturon
This landed on rust-lang/rust#33748, though it's not stable yet. I guess this issue should be closed? |
Indeed! |
Note that the tracking issue is v |
petrochenkov
added
the
T-libs-api
Relevant to the library API team, which will review and decide on the RFC.
label
Jan 29, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now that we're using condition variables for blocking, it should be relatively easy to add a
recv_timeout
method once the timeout concept is stabilized andwait_timeout
onCondvar
is also stabilized.The text was updated successfully, but these errors were encountered: