Maybe even a
#[cfg(debug_assertions)]
if futures.len() > 1000 {
warn!("join_all is only intended for running small dynamic lists of futures, use FuturesUnordered for large numbers");
}
(probably could even be a much lower limit, I don't know if anyone has ever tested what a good limit is).
Does futures really use log?
Not currently, but the only other option I can think of would be debug_assert! which seems far too drastic to me.
(I think the fundamental solution is to change the name to include a word that describes its feature(=only efficient for relatively small lists), but that's a breaking change of course.)
Another option would be to have it use FuturesUnordered internally when the number of futures is large.
Most helpful comment
Another option would be to have it use
FuturesUnorderedinternally when the number of futures is large.