> Seems like a lot of people have trouble with this error. Here's my
> solution. I give it to the future. Because I love you.
[quoted text clipped - 11 lines]
> }
> }

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
> That seems to change the behaviour entirely though - isn't it actually
> waiting for *all* of the handles, just sequentially?
Doh - ignore me. I thought you were trying to mimic Wait*Any* by
calling it multiple times.
Why use WaitAny with an array rather than calling WaitOne directly on
each handle? That would seem somewhat simpler to me.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Jon Skeet [C# MVP] - 30 Sep 2005 19:48 GMT
> > That seems to change the behaviour entirely though - isn't it actually
> > waiting for *all* of the handles, just sequentially?
[quoted text clipped - 4 lines]
> Why use WaitAny with an array rather than calling WaitOne directly on
> each handle? That would seem somewhat simpler to me.
And another point (which I must admit was pointed out to me by Ian
Griffiths - I won't take credit for it) - the whole point of WaitAll is
that it's an atomic acquisition, effectively. You unfortunately lose
the atomicity in your call, so you could introduce deadlocks which
wouldn't otherwise be present.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
isbat1@yahoo.com - 30 Sep 2005 19:57 GMT
Myopic thinking. I was fixated on getting a method from WaitHandle to
work. I blame my antibiotics.
Well, since you can't do a WaitAll from an STA thread, the only other
thing I know to do is to wait for each wait handle individually. Have
I misunderstood something?