basho / riak-python-client

The Riak client for Python.
Apache License 2.0
321 stars 183 forks source link

Clarification needed: multiget - calling queue.task_done without ever calling queue.join() [JIRA: CLIENTS-1083] #521

Closed finnci closed 7 years ago

finnci commented 7 years ago

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.

lukebakken commented 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!

Basho-JIRA commented 7 years ago

Fixed, or closed via GitHub issues.

[posted via JIRA by Alexander Moore]