-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 20/10/10 00:58, Antoine Pitrou wrote:
It would be nice to know about the use case Jesus has in mind.
I am thinking about the cases where a request come, you do some disk read in behalf of it and you reply.
If the read is "slow" (if not cached, you have to deal with a physical harddisk), you stop the main-loop for a while, unless you use threads.
If, instead, I can schedule a read and keep processing other requests (possibly queueing new reads), be notified when the read is done and complete the reply, I think this is more simple and performing (and far less memory hungry) that using threads.
I just opened a issue, assigned to me. I plan to do the implementation myself, at least for Solaris and possibly (recent) Linux: <http://bugs.python.o rg/issue11117>.
Some people say AIO OS implementations are flaky. Well, you must deal with it, like you deal with other flaky OS corners, like exhausting memory or whatever.
I would suppose that if Python exposes AIO and in some OS support is underpar, the exposing would incentivate a better support for OS. Like happened to threads and linux years ago.
- -- Jesus Cea Avion _/_/ _/_/_/ _/_/_/ email@example.com - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/ jabber / xmpp:firstname.lastname@example.org _/_/ _/_/ _/_/_/_/_/ . _/_/ _/_/ _/_/ _/_/ _/_/ "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ "El amor es poner tu felicidad en la felicidad de otro" - Leibniz