[issue37503] Queue.join(): Broken example in documentation

2019-07-05 Thread Marco Dickert
Marco Dickert added the comment: Sorry, I missed that q.join() is executed *before* the "None" item is added to the queue. In my real-world case I called q.join() *after* I added the "None" item. -- resolution: -> not a bug stage: -> resol

[issue37503] Queue.join(): Broken example in documentation

2019-07-05 Thread Marco Dickert
New submission from Marco Dickert : I guess I found a bug in the documented Queue.join() example [1]. The problem is the break condition for the while loop of the worker. If the item is None, the loop breaks, but the worker never calls item.task_done(). Thus the q.join() statement never