[Python-ideas] Add closing and iteration to threading.Queue

Terry Reedy tjreedy at udel.edu
Sun Oct 21 20:02:38 EDT 2018

On 10/21/2018 2:42 PM, MRAB wrote:
> On 2018-10-21 18:58, Vladimir Filipović wrote:
>> Hi!
>> I originally submitted this as a pull request. Raymond Hettinger
>> suggested it should be given a shakeout in python-ideas first.
>> https://github.com/python/cpython/pull/10018
>> https://bugs.python.org/issue35034

The proposed close method would only half-close the queue: closed to 
puts, open to gets (but perhaps close completely when the last item is 

> FTR, this has been discussed before:
 > [Python-ideas] `__iter__` for queues?

Worth reading in relation to the new proposal.  One person reported 
having an IterableQueue with close that is probably similar to the 
current proposal.

Terry Jan Reedy

More information about the Python-ideas mailing list