
Nov. 2, 2012
4:54 p.m.
On Sat, 3 Nov 2012 00:50:15 +0100 Sturla Molden <sturla@molden.no> wrote:
Or a simpler solution than nesting them into a tree: Let the calls to WaitForMultipleObjects time out at once, and loop over as many events as you need, polling 64 event objects simultaneously.
Well, that's basically O(number of objects), isn't it?
Yes, but nesting would be O(log64 n).
No, you still have O(n) calls to WaitForMultipleObjects, just arranged differently. (in other words, the depth of your tree is O(log n), but its number of nodes is O(n)) Regards Antoine.