Unfortunately, that's as good as it gets right now. When we asked almost two years ago about this on this list, the answer was, "we'll look into it". But it looks like it was one of those things that fell through the cracks. The docs at the time said that the Thread class would itself extend the WaitHandle base class, allowing you to do a WaitMultiple on them, but they never got around to actually building it that way...
-Mike http://staff.develop.com/woodring http://www.develop.com/devresources ----- Original Message ----- From: "Murphy, James" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 18, 2002 8:40 AM Subject: Re: [DOTNET] Waiting for multiple Threads > Provided the threads are at least started you can call join sequentially on > the collection of thread objects... > > ArrayList threads; > ... > > foreach (Thread t in threads) > t.Join(); > > Should work though I haven't tried it :) > > Jim > > > -----Original Message----- > > From: Diego Gonzalez [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, April 18, 2002 9:18 AM > > To: [EMAIL PROTECTED] > > Subject: Re: [DOTNET] Waiting for multiple Threads > > > > > > But WaitAll() receives a WaitHandle[], and i don't know how to get the > > Thread hanlde in order to wait for it.Using Join() allows the > > current thread > > to wait for another thread, i wanted to wait for multiple threads. > > > > Diego > > > > ----- Original Message ----- > > From: "Nick Wienholt" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Wednesday, April 17, 2002 11:47 PM > > Subject: Re: [DOTNET] Waiting for multiple Threads > > > > > > > Hi Diego, > > > > > > If you are waiting for the threads to terminate, use Thread.Join. > > > Otherwise, WaitHandle.WaitAll is the System.Threading equivalent to > > > WaitForMultipleObjects. > > > > > > Nick > > > > > > ----- Original Message ----- > > > From: "Diego Gonzalez" <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Thursday, April 18, 2002 3:35 AM > > > Subject: [DOTNET] Waiting for multiple Threads > > > > > > > > > > Is there any way to wait for multiple running Threads? I will call > > > > WaitForMultipleObjects, but there is no way to get the > > thread handle. > > > > > > > > Diego > > > > > > > > You can read messages from the DOTNET archive, > > unsubscribe from DOTNET, > > or > > > > subscribe to other DevelopMentor lists at > http://discuss.develop.com. > > > > > > > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or > > subscribe to other DevelopMentor lists at http://discuss.develop.com. > > > > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or > subscribe to other DevelopMentor lists at http://discuss.develop.com. > > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or > subscribe to other DevelopMentor lists at http://discuss.develop.com. > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.