[Python-Dev] Support for async read/write (original) (raw)

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Tue Oct 19 19:47:39 CEST 2010


On 04:50 pm, jcea at jcea.es wrote:

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Current Python lacks support for "aio*" syscalls to do async IO. I think this could be a nice addition for python 3.3.

Adding more platform wrappers is always nice. Keep in mind that the quality of most (all?) aio_* implementations is spotty at best, though. On Linux, they will sometimes block (for example, if you fail to align buffers properly, or open a file without O_DIRECT, or if there are too many other aio operations active on the system at the time, etc). Thus, these APIs are finicky at best, and the Python bindings will be similarly fragile.

Jean-Paul

If you agree, I will create an issue in the tracker. If you think the idea is of no value, please say so for me to move on.

Do you have an application in mind?

Maybe an 3th party module, but I think this functionality sould be available in core python.

Starting off as a 3rd party library to try to develop some interest and users (and thus experience) before adding it to the standard library might make sense (as it frequently does).

Thanks!.

PS: The function calls are: aiocancel, aioerror, aiofsync, aioread, aioreturn, aiowrite.

Jean-Paul



More information about the Python-Dev mailing list