[issue21595] Creating many subprocess generates lots of internal BlockingIOError
STINNER Victor
report at bugs.python.org
Wed May 28 23:20:32 CEST 2014
STINNER Victor added the comment:
BaseProactorEventLoop._loop_self_reading() uses an overlapped read of 4096 bytes. I don't understand how it wakes up the event loop. When the operation is done, _loop_self_reading() is scheduled with call_soon() by the Future object. Is it enough to wake up the event loop?
Is BaseProactorEventLoop correct?
--
Oh, I forgot to explain this part of asyncio_read_from_self.patch:
+ data = self._ssock.recv(4096)
+ if not data:
+ break
This break "should never occur". It should only occur if _ssock is no more blocking. But it would be a bug, because this pipe is private and set to non-blocking at its creation.
I chose to add the test because it should not hurt to add it "just in case" (and to avoid an unlimited busy loop).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21595>
_______________________________________
More information about the Python-bugs-list
mailing list