Thread.Join Method (Int32)
Assembly: mscorlib (in mscorlib.dll)
public boolean Join ( int millisecondsTimeout )
public function Join ( millisecondsTimeout : int ) : boolean
Not applicable.
Parameters
- millisecondsTimeout
The number of milliseconds to wait for the thread to terminate.
Return Value
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.Exception type | Condition |
---|---|
The value of millisecondsTimeout is negative and is not equal to Timeout.Infinite in milliseconds. | |
The thread has not been started. |
If Timeout.Infinite is specified for the millisecondsTimeout parameter, this method behaves identically to the Join method overload, except for the return value.
If the thread has already terminated when 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.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.