[issue12155] queue example doesn't stop worker threads

2015-03-18 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed versions: +Python 3.5 -Python 2.7, Python 3.1, Python 3.2, Python 3.3 ___ Python tracker ___ _

[issue12155] queue example doesn't stop worker threads

2015-03-18 Thread Roundup Robot
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

[issue12155] queue example doesn't stop worker threads

2011-05-28 Thread Terry J. Reedy
Terry J. Reedy 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 __

[issue12155] queue example doesn't stop worker threads

2011-05-24 Thread STINNER Victor
STINNER Victor 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 link to it. I just propose t

[issue12155] queue example doesn't stop worker threads

2011-05-23 Thread Raymond Hettinger
Raymond Hettinger 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 threads wasn't the intent of

[issue12155] queue example doesn't stop worker threads

2011-05-23 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue12155] queue example doesn't stop worker threads

2011-05-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue12155] queue example doesn't stop worker threads

2011-05-23 Thread STINNER Victor
New submission from STINNER Victor : 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 = Thread(target=worker) t.daemon = Tr