python-librato icon indicating copy to clipboard operation
python-librato copied to clipboard

race condition in queue.submit()

Open fracai opened this issue 1 year ago • 0 comments

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 avatar Aug 05 '23 02:08 fracai