3 Nov
2012
3 Nov
'12
12:32 a.m.
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%2... -- Richard.