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

Fixes #12289 - Improve ConcurrentPool concurrency. #12290

Merged
merged 3 commits into from
Sep 20, 2024

Commits on Sep 18, 2024

  1. Fixes #12289 - Improve ConcurrentPool concurrency.

    A call to `sweep()`, although protected by the lock for concurrent calls to `reserve()`, may be concurrent with `remove(Entry)`.
    
    `remove(Entry)` in turn calls `entries.remove(Object)`, so that the concurrent iteration in `sweep()` over `entries` fails with an `ArrayIndexOutOfBoundsException`.
    
    Now using the bulk `entries.removeIf(Predicate)` method in `sweep()`, so that sweeping is atomic with respect to `entries.remove(Object)`.
    
    Signed-off-by: Simone Bordet <[email protected]>
    sbordet committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    136e62a View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2024

  1. Fixed other occurrences of manual iteration over CopyOnWriteArrayList…

    … that may be concurrent with removals.
    
    Signed-off-by: Simone Bordet <[email protected]>
    sbordet committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    8bddf52 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. Updates from review.

    Signed-off-by: Simone Bordet <[email protected]>
    sbordet committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    4d3e952 View commit details
    Browse the repository at this point in the history