Home All Groups Group Topic Archive Search About

WaitHandle and Threads

Author
20 Apr 2006 5:06 PM
Michael D. Ober
In the Windows API, WaitForMultipleObjects can wait on Thread Handles.  Can
the .NET 2.0 WaitHandle.WaitOne (or WaitHandle.WaitAll) methods use an array
of Thread variables?

For example:

dim ThreadWait(10) as Thread

ThreadWait(0) = new Thread(addressof MyThreadProc)
ThreadWait(1) = ...

....

ThreadWait(10) = new Thread(addressof MyThreadProc)

dim CompletedThread as integer = WaitHandle.WaitOne(ThreadWait)

Thanks,
Mike.

AddThis Social Bookmark Button