Closed finnci closed 7 years ago
We could add a join()
call at the end of this method, but as we do wait on all workers it isn't strictly necessary.
So, like you point out, task_done()
isn't necessary either, but has been there since the dawn of time.
If you would like to follow up, please feel free to re-open this issue. Thanks!
Fixed, or closed via GitHub issues.
[posted via JIRA by Alexander Moore]
As seen in the documentation, task_done is only used/cared for when you might be doing a Queue.join() call (looking at the python source code confirms this also). Which is never seen within multi.py, however I do see multiple instances of the task_done call; example.
Is there some other undocumented side-affect of calling task_done in each of these places? Or is this likely an artefact of some older feature/ port from another language?
I realise that calling task_done doesn't cause anything to break, and keeps the queue in a state with a "more correct" view of what tasks it has processed, but i'm wondering if it is used for something unexpected.