[Python-ideas] The async API of the future
Sturla Molden
sturla at molden.no
Sat Nov 3 10:22:46 CET 2012
Den 3. nov. 2012 kl. 01:32 skrev Richard Oudkerk <shibturn at gmail.com>:
> On 02/11/2012 11:10pm, Sturla Molden wrote:
>> So you nest them in a tree, each node having up to 64 children...
>>
>> The root allows us to wait for 64 objects, the first branch allows us to wait for 4096, and the second 262144...
>>
>> For example, if 4096 wait objects are enough, we can use a pool of 64 threads. Each thread calls WaitForMultipleObjects on up to 64 wait objects, and signals to the master when it wakes up.
>
> Windows already has RegisterWaitForSingleObject() which basically does what you describe:
>
> http://msdn.microsoft.com/en-gb/library/windows/desktop/ms685061%28v=vs.85%29.aspx
>
No, it does something completely different. It registers a callback function for a single event object and waits. We were talking about multiplexing a wait for more than 64 objects.
Sturla
More information about the Python-ideas
mailing list