I suspect this might be the right forum to contact the maintainers of the futures crate, so here's an issue as well and a cleaned up repro. Namely, this hangs:
#[tokio::main]
async fn main() {
use futures::future;
use futures::stream;
use futures::StreamExt;
use tokio::time::interval;
use tokio_stream::wrappers::IntervalStream;
let inner = IntervalStream::new(interval(std::time::Duration::from_millis(500)))
.map(|_| stream::once(future::ready("VALUE")))
.flatten_unordered(None);
let mut stream = stream::once(future::ready(inner)).flatten_unordered(None);
while let Some(value) = stream.next().await {
dbg!(&value);
}
}
This seems like it should evidently just yield values forever (by creating a new stream-of-1-value every 500ms), but as-is it does not and it just hangs after the first value.
I've (also) run into this issue that was reported on users.rust-lang.
I suspect this might be the right forum to contact the maintainers of the
futures
crate, so here's an issue as well and a cleaned up repro. Namely, this hangs:This seems like it should evidently just yield values forever (by creating a new stream-of-1-value every 500ms), but as-is it does not and it just hangs after the first value.