10 ms·
Thanks for your write up. This sounds like a perfect use case for async generators (which yield many times and compile to Stream instead of Future), a feature I
by withoutboats3 2y ago
Thanks for your write up. This sounds like a perfect use case for async generators (which yield many times and compile to Stream instead of Future), a feature I hope Rust will gain in the next year or two. To receive messages from other parts of the program, I would have the async generator hold the receiving end of a channel.
- josephg 2y agoYeah, I would love generators (and async generators) to make it into stable rust. They would be a godsend for my work.