Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try_join_all does not short circuit for large input #2866

Open
stepancheg opened this issue Jun 26, 2024 · 0 comments
Open

try_join_all does not short circuit for large input #2866

stepancheg opened this issue Jun 26, 2024 · 0 comments

Comments

@stepancheg
Copy link
Contributor

try_join_all documentation says:

If any future returns an error then all other futures will be canceled and an error will be returned immediately

source

However, when try_join_all switches to FuturesOrdered for large inputs, this is not longer the case: implementation processes future results in order, and if first future is slow, and second future is already finished, try_join_all won't return immediately, but will wait for first slow future completion.

@JakobDegen made an example reproducing this issue: playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant