This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Description
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.