Skip to content

Refactor parallel operation manager #4630

Closed as not planned
Closed as not planned

Description

Description

There is still a tiny chance that we will attempt to schedule some work twice, but this was never observed, so I am not making it part of #4629 .

In ParallelOperationManager we should figure out work to do under lock, set a property on the slot that we are processing it, and then leave the lock. Under the lock we should not read anything from the slots, just loop over the collections of work we got.

This way we avoid reading ShouldPreStart (or similar property) from 2 threads just at the wrong moment, where both threads will try to start the work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions