Simply Join All Threads one By One

On 2/24/09, Benj Nunez <[email protected]> wrote:
>
> " Is there any other way I can wait for all threads to
>  complete ?"
>
>
> Hi there,
>
> This article might give you a clue:
>
> http://www.codeproject.com/KB/threads/waitforthreads.aspx
>
>
> Cheers,
>
>
> Benj
>
>
>
> On Feb 23, 10:56 pm, graphicsxp <[email protected]> wrote:
>> Actually SetMaxThreads does work, I wasn't testing properly.
>>
>> If I do : ThreadPool.SetMaxThreads(2, 2);
>>
>> I can see my threads being queued to the pool, but then they only
>> complete by batch of two, which is exactly what I would expect :)
>>
>> I have another question though. I'm using an array of ManualResetEvent
>> to wait for all threads. Unfortunately they are limited to 64
>> events !  Is there any other way I can wait for all threads to
>> complete ?
>>
>> Thanks

Reply via email to