[issue32561] Add API to io objects for cache-only reads/writes

STINNER Victor report at bugs.python.org
Fri Oct 11 08:47:25 EDT 2019


STINNER Victor <vstinner at python.org> added the comment:

I suggest to leave not attempt to put "async or "await" in the io module to keep it a "simple" as possible, but fix bpo-13322 (in io and _pyio modules).

Instead, I suggest to write a new module only providing asynchronous methods, maybe even for open() and close(). But the new module can reuse the existing io module to avoid having to write complex algorithm like read-ahead, buffering, etc.

Well, I'm not 100% sure that it's doable, since io is hiding many implementation details, there are complex issues like multithreading, locks, interlaced read and write operations, etc.

Note: The io module doesn't fully suppored interlaced read and write :-) See bpo-12215 for example.

----------

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


More information about the Python-bugs-list mailing list