Share via


Join Method (Int32)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Blocks the calling thread until a thread terminates or the specified time elapses, while continuing to perform standard COM and SendMessage pumping.

Namespace:  System.Threading
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Function Join ( _
    millisecondsTimeout As Integer _
) As Boolean
public bool Join(
    int millisecondsTimeout
)
public:
bool Join(
    int millisecondsTimeout
)
member Join : 
        millisecondsTimeout:int -> bool 
public function Join(
    millisecondsTimeout : int
) : boolean

Parameters

  • millisecondsTimeout
    Type: System. . :: . .Int32
    The number of milliseconds to wait for the thread to terminate.

Return Value

Type: System. . :: . .Boolean
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.

Remarks

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.

.NET Framework Security

See Also

Reference

Thread Class

Join Overload

System.Threading Namespace