[Python-ideas] An alternate approach to async IO

Sturla Molden sturla at molden.no
Thu Nov 29 17:02:32 CET 2012


On 29.11.2012 13:24, Trent Nelson wrote:

>> At this point, I propose you start writing some code and come back with
>> benchmark numbers, before claiming that your proposal improves
>> performance at all.
>
>      That's the plan.  (Going to put aside a few hours each day to work
>      on it.)  So, watch this space, I guess.

I'd also like to compare with a single-threaded design where the Python 
code calls GetQueuedCompletionStatusEx with a time-out. The idea here is 
an initial busy-wait with immediate time-out without releasing the GIL. 
Then after e.g. 2 ms we release the GIL and do a longer wait. That 
should also avoid excessive GIL shifting with "64k tasks". Personally I 
don't think a thread-pool will add to the scalability as long as the 
Python code just runs on a single core.

Sturla








More information about the Python-ideas mailing list