rust-lang / futures-rs

Zero-cost asynchronous programming in Rust
https://rust-lang.github.io/futures-rs/
Apache License 2.0
5.34k stars 616 forks source link

fu: always replace inner wakers #2726

Closed olegnn closed 1 year ago

olegnn commented 1 year ago

Fixes #2725. As nested FlattenUnordered will be placed into a new future inside of FuturesUnordered every time its inner stream emits an item, its base stream's waker will point to an outdated task, and this will result in an inability to propagate the call properly.