-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Implement more communication primitives #1255
Comments
Things have become better thanks to recv2, std::time etc but there still is no true way to recv with a timeout. This likely needs support by the runtime. |
This bug had a lot of pieces, which made it daunting and difficult to keep track of all that were done. I opened up a bunch of smaller bugs that reference this issue so we can keep track of them easier and keep them more manageable. Feel free to add comments about the desired semantics in all of them. @boggle, I wrote the new bugs for the new protocol/pipe system, since I'm hoping to remove the port/chan system in favor of pipes. Does this work for you? |
I sadly haven't come round to looking at pipes but as long as the functionality I asked for while be there I am happy with that. On a very different note, are you aware of the disruptor project? It is the first true innovation in concurrency I have seen in a while and I keep wondering how one would implement that in rust. |
If all of the parts of this bug have individual bugs, can we close this one? |
Sure, although having this one open does give us a convenient place to go find a list of all the related bugs. |
Add abi-checker to y.rs and run it on CI
We are lacking at least one critical primitive:
recv
onport<T>
with timeout that returns anoption<T>
It may be desirable to
recv
from multiple ports at once, which may needrecv
on[port<T>]
that returns(uint, T)
recv
on[port<T>]
with timeout that returnsoption<(uint, T)>
recv_some
on[port<T>]
with timeout that returns[T]
or[(int, T)]
recv
from a set of differently typed ports at once and match on the result somehowThese calls perhaps would be useful for sending to many channels:
send_any(value: T, channels: [chan<T>])
that returns theuint
vec index of the channel actually usedchannels
send_ready(value: T, channels: [chan<T>])
that returns theuint
vec index of the channel actually usedchannels
send_all(value: T, channels: [chan<T>])
The text was updated successfully, but these errors were encountered: