src/openSourceC.DotNetLibrary.Core/Threading/ServiceThreadSet.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="timeout">A TimeSpan set to the amount of time 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="timeout"/>
///		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(TimeSpan timeout)
		{
			bool terminated = true;
			lock (((ICollection)_serviceThreads).SyncRoot)
			{
				foreach (ServiceThread serviceThread in _serviceThreads.Values.ToArray())
				{
					if (serviceThread.Thread.Join(timeout))
					{
						_serviceThreads.Remove(serviceThread.InstanceId);
					}
					else
					{
						terminated = false;
					}
				}
			}
			return terminated;
		}
public bool Join ( TimeSpan timeout ) { bool terminated = true ; lock ( ( ( ICollection ) _serviceThreads ) . SyncRoot ) { foreach ( ServiceThread serviceThread in _serviceThreads . Values . ToArray ( ) ) { if ( serviceThread . Thread . Join ( timeout ) ) { _serviceThreads . Remove ( serviceThread . InstanceId ) ; } 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 .
timeout
TimeSpan
A TimeSpan set to the amount of time to wait for each thread to
terminate.
A TimeSpan set to the amount of time to wait for each thread to terminate .