[issue32561] Add API to io objects for non-blocking reads/writes

Antoine Pitrou report at bugs.python.org
Tue Jan 16 03:13:19 EST 2018


Antoine Pitrou <pitrou at free.fr> added the comment:

> Ideally we would be able to do buffer-only reads through all the of the different read methods (read, readline, readinto, ...),

Hmm... We already have non-blocking support in BufferedIOReader, except it *doesn't work*.  The problem is, the semantics mandated by readline() and even buffered read() don't work very well with non-blocking IO (see issue13322).

So my opinion here is that only raw IO objects (FileIO) should have this functionality.  People can build their own functionality on top of that (such as Tornado or asyncio do with their streams).

----------
nosy: +pitrou

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32561>
_______________________________________


More information about the Python-bugs-list mailing list