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
It would be nice if a RingReceiver supported a receive with a timeout operation. Are there plans to add one?
I'd be up to help with the implementation if there's some guidance available :).
The text was updated successfully, but these errors were encountered:
Hi, thank you for the interest in the library! The challenge with adding timed block operation is that this needs an async executor that is quite a bit more complicated than the futures::executor::block_on we currently use under the hood, and I don't think it really makes sense to either build a dependency on some full fledged async executor, or to build our build.
What problem are you actually trying to solve? If you are already using something like Tokio you can wait on a message with a timeout very easily, see for example https://docs.rs/tokio/latest/tokio/time/fn.timeout.html. I'm sure other async frameworks have something equivalent as well.
Thanks for the quick replay!
I see, makes perfect sense to keep the lib executor-agnostic 👍.
I'm using tokio but not in the part of the project where I'm using the RingReceiver. However I think I can refactor some of it to be able to use tokio's features there.
It would be nice if a
RingReceiver
supported a receive with a timeout operation. Are there plans to add one?I'd be up to help with the implementation if there's some guidance available :).
The text was updated successfully, but these errors were encountered: