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

FuturesUnordered: fix partial iteration #2574

Merged

Commits on Feb 23, 2022

  1. FuturesUnordered: fix partial iteration

    The IntoIter impl advances the head pointer every iteration, but this breaks the linked list invariant that the head's prev should be null.
    
    If the iteration is not done to completion, on subsequent drop, FuturesUnordered::unlink relies on this broken invariant and ends up panicking.
    
    The fix is to maintain the `head->prev == null` invariant while iterating. Also added a test for this bug.
    wfraser committed Feb 23, 2022
    Configuration menu
    Copy the full SHA
    108e569 View commit details
    Browse the repository at this point in the history