When we can use Rust 1.87, this function can be tweaked to use Vec::extract_if. The function splits the blocked streams collection into two: those that are no longer blocked and those that it retains. Presently, the caller needs a Vec, so the gain is minor, but they really only need to iterate over the blocked streams to drive a read on each. A small bit of restructuring might allow this function to run without an allocation.