[issue31368] Support asynchronous, non-blocking buffered reads (RWF_NONBLOCK)
STINNER Victor
report at bugs.python.org
Mon Jan 22 19:53:31 EST 2018
STINNER Victor <victor.stinner at gmail.com> added the comment:
Explanation for myself.
https://kernelnewbies.org/Linux_4.14#Asynchronous_buffered_I.2FO_support
"In this release, the preadv2(2) syscall with RWF_NONBLOCK will let userspace applications bypass enqueuing operation in the threadpool if it's already available in the pagecache."
For applications using a thread pool, like the aiofiles does for asyncio, preadv2() allows to bypass the thread pool which is obviously faster. If the read block, just uses thread pool as currently done.
Same rationale for pwritev2().
----------
nosy: +vstinner
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31368>
_______________________________________
More information about the Python-bugs-list
mailing list