Message219301
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). |
|
Date |
User |
Action |
Args |
2014-05-28 21:20:32 | vstinner | set | recipients:
+ vstinner, gvanrossum, pitrou, giampaolo.rodola, yselivanov, Sebastian.Kreft.Deezer |
2014-05-28 21:20:32 | vstinner | set | messageid: <1401312032.8.0.872094043932.issue21595@psf.upfronthosting.co.za> |
2014-05-28 21:20:32 | vstinner | link | issue21595 messages |
2014-05-28 21:20:31 | vstinner | create | |
|