Blocks the calling thread until a thread terminates or the specified time elapses, while continuing to perform standard COM and SendMessage pumping.
true if the thread has terminated; false if the thread has not terminated after the amount of time specified by the millisecondsTimeout parameter has elapsed.
Type Reason ArgumentOutOfRangeException The value of millisecondsTimeout is negative and is not equal to Timeout.Infinite . System.Threading.ThreadStateException The caller attempted to join a thread that is in the ThreadState.Unstarted state.
If Timeout.Infinite is specified for the millisecondsTimeout parameter, this method behaves identically to the Thread.Join method overload, except for the return value.
If the thread has already terminated when erload:System.Threading.Thread.Join is called, the method returns immediately.
This method changes the state of the calling thread to include ThreadState.WaitSleepJoin. You cannot invoke Join on a thread that is in the ThreadState.Unstarted state.