Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

race condition in queue.submit() #178

Open
fracai opened this issue Aug 5, 2023 · 0 comments · May be fixed by #179
Open

race condition in queue.submit() #178

fracai opened this issue Aug 5, 2023 · 0 comments · May be fixed by #179

Comments

@fracai
Copy link

fracai commented Aug 5, 2023

queue.submit() iterates over chunks, sends each, and then resets the chunks. This can be a problem if any process adds items to the queue while submit() is iterating. When that happens, the new additions can be cleared out before they can be sent.

An alternative is to repeatedly pop the first chunk while the chunks aren't empty. I'll open a pull request.

@fracai fracai linked a pull request Aug 5, 2023 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant