src/openSourceC.DotNetLibrary.Core/Threading/ThreadSet.cs
/// <summary>
///		Blocks the calling thread until each thread represented by this instance terminates
///		or the specified time elapses for each thread, while continuing to perform standard
///		COM and SendMessage pumping.
/// </summary>
/// <param name="millisecondsTimeout">The number of milliseconds to wait for each thread to
///		terminate.</param>
///	<returns>
///		<b>true</b> if all of the threads have terminated; <b>false</b> if any thread has
///		not terminated after the amount of time specified by the
///		<paramref name="millisecondsTimeout"/> parameter has elapsed.
///	</returns>
Blocks the calling thread until each thread represented by this instance terminates
or the specified time elapses for each thread, while continuing to perform standard
COM and SendMessage pumping.
Blocks the calling thread until each thread represented by this instance terminates or the specified time elapses for each thread while continuing to perform standard COM and SendMessage pumping .
public bool Join(int millisecondsTimeout)
		{
			bool terminated = true;
			lock (((ICollection)_threads).SyncRoot)
			{
				for (int i = _threads.Count; i-- != 0;)
				{
					Thread thread = _threads[i].Thread;
					if (thread.Join(millisecondsTimeout))
					{
						_threads.RemoveAt(i);
					}
					else
					{
						terminated = false;
					}
				}
			}
			return terminated;
		}
public bool Join ( int millisecondsTimeout ) { bool terminated = true ; lock ( ( ( ICollection ) _threads ) . SyncRoot ) { for ( int i = _threads . Count ; i -- != 0 ; ) { Thread thread = _threads [ i ] . Thread ; if ( thread . Join ( millisecondsTimeout ) ) { _threads . RemoveAt ( i ) ; } else { terminated = false ; } } } return terminated ; }
Blocks the calling thread until each thread represented by this instance terminates
or the specified time elapses for each thread, while continuing to perform standard
COM and SendMessage pumping.
Blocks the calling thread until each thread represented by this instance terminates or the specified time elapses for each thread while continuing to perform standard COM and SendMessage pumping .
truefalse parameter has elapsed.
truefalse parameter has elapsed .
millisecondsTimeout
int
The number of milliseconds to wait for each thread to
terminate.
The number of milliseconds to wait for each thread to terminate .