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

Refactor parallel operation manager #4630

Open
nohwnd opened this issue Jul 31, 2023 · 1 comment
Open

Refactor parallel operation manager #4630

nohwnd opened this issue Jul 31, 2023 · 1 comment

Comments

@nohwnd
Copy link
Member

nohwnd commented Jul 31, 2023

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.

@nohwnd
Copy link
Member Author

nohwnd commented Jul 31, 2023

fyi @cvpoienaru this should probably be done before re-enabling the pre-start. It is not a lot of work, just a small reshuffle.

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