Our great sponsors
-
tokio
A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Now, that said, this problem was much worse in the past (see this issue), where using join_all would lead to a quadratic number of calls to poll. Today, it is only a constant factor slower than the for loop, but the constant is rather large. It uses FuturesUnordered internally, which has a rather large amount of overhead because it stores all of the futures in a linked list, using a separate allocation for each JoinHandle.
Done.
NOTE:
The number of mentions on this list indicates mentions on common posts plus user suggested alternatives.
Hence, a higher number means a more popular project.