[Python-ideas] An alternate approach to async IO

Richard Oudkerk shibturn at gmail.com
Wed Nov 28 20:11:42 CET 2012


On 28/11/2012 6:59pm, Sturla Molden wrote:
>
>> You are assuming that GetQueuedCompletionStatus*() will never block
>> because of lack of work.
>
> GetQueuedCompletionStatusEx takes a time-out argument, it can be zero.
>
> Sturla

According to your (or Trent's) idea the main thread busy waits until the 
interlocked list is non-empty.  If there is no work to do then the 
interlocked list is empty and the main thread will busy wait till there 
is work to do, which might be for a long time.

-- 
Richard




More information about the Python-ideas mailing list