New submission from Mathias Fröjdman:
queue.Queue should have a close() method. The result of calling the method
would be to raise a new exception - queue.Closed, for any subsequent calls to
Queue.put, and after the queue is empty, also for Queue.get.
Why: To allow producers (callers of
New submission from Mathias Fröjdman:
Since asyncio event loops have to be closed nowadays, it would be pretty
convenient and pythonic to make BaseEventLoop a context manager that calls
self.close() in __exit__ the same way as contextlib.closing() does it. Example:
import asyncio
with
Mathias Fröjdman added the comment:
(Just noticed http://bugs.python.org/issue19860, which I originally failed to
notice when just searching for "asyncio loop" and not context manager)
Anyway, in recent Python/asyncio versions, failing to close the event loop
before exiting whole t
New submission from Mathias Fröjdman:
Script attached which reproduces the issue.
Steps to reproduce:
0) Use python 3.4.3 on Linux. Does not repro with 3.4.0 or 3.4.2.
1) Create a child process with asyncio.create_child_exec and stdout=PIPE
2) loop yield from child.read(n) (i used n=2048, any