Roundup Robot added the comment:
New changeset b44ec269abda by Victor Stinner in branch 'default':
Issue #12155: Fix queue doc example to join threads
https://hg.python.org/cpython/rev/b44ec269abda
--
nosy: +python-dev
___
Python tracker
Changes by STINNER Victor victor.stin...@gmail.com:
--
resolution: - fixed
status: open - closed
versions: +Python 3.5 -Python 2.7, Python 3.1, Python 3.2, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12155
Terry J. Reedy tjre...@udel.edu added the comment:
The proposed change adds about 7 lines to show the 'trick' of putting
num-worker Nones on the queue. I think that is worth it.
--
nosy: +terry.reedy
___
Python tracker rep...@bugs.python.org
STINNER Victor victor.stin...@haypocalc.com added the comment:
Is it unclear to you what those mean?
Well, it's clear, but I like when I can simply copy/paste the example and it
does just work:
If you post a high-quality self-contained example somewhere
on the net, I would be happy to
New submission from STINNER Victor victor.stin...@haypocalc.com:
The queue doc contains the following example:
--
def worker():
while True:
item = q.get()
do_work(item)
q.task_done()
q = Queue()
for i in range(num_worker_threads):
t =
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12155
___
___
Python-bugs-list
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
assignee: docs@python - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12155
___
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
It doesn't define do_work(), num_worker_threads or do_work()
Is it unclear to you what those mean? They are placeholders for the user's
actual task at hand.
my concern is that it doesn't stop worker threads.
Stopping the