@asyncrs What's the equivalent of libstd's mpsc::Receiver::recv_timeout(x)?
`receiver.timeout(x).next()` something is the closest I got, but the docs on Stream::timeout is not clear if it's per item or if the entire stream becomes invalid.
-
-
Awesome. Follow up question. What would be the best way, currently, to do the same as libstd's try_recv then? I assume a timeout with duration zero can be very flaky which one gets to go first?
-
try_send is easy, but we probably need to expose try_recv natively. We have it internally here: https://github.com/async-rs/async-std/blob/c4ba11ff9539ab4063ad275174e74df4282184bc/src/sync/channel.rs#L769 …; just need to expose it publicly. If you have a use case for this, opening an issue with a short explanation of why you want it would be much appreciated!
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
