Mono Class Library: System.Threading.Thread Overview | Members

System.Threading.Thread.Join Method

Blocks the calling thread until the thread on which this method is invoked terminates or the specified time elapses. [Edit]

public bool Join (int millisecondsTimeout)

Parameters

millisecondsTimeout
A int containing the number of milliseconds to wait for the thread to terminate. [Edit]

Returns

true if the thread has terminated; false if the thread has not terminated after millisecondsTimeout has elapsed. [Edit]

Exceptions

TypeReason
ArgumentOutOfRangeExceptionThe value of millisecondsTimeout is negative and is not equal to Timeout.Infinite . [Edit]
System.Threading.ThreadStateExceptionThe caller attempted to join a thread that is in the ThreadState.Unstarted state. [Edit]

Remarks

Note: If Timeout.Infinite is specified for millisecondsTimeout, this method behaves identically to Join (), except for the return value.

Join cannot be invoked on a thread that is in the ThreadState.Unstarted state.

This method changes the state of the calling thread to include ThreadState.WaitSleepJoin.

[Edit]

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0