Thread.join

Thread.join

Class Overview | Class Members | This Package | All Packages

Syntax 1
public final synchronized void join( long millis ) throws InterruptedException
Parameters
millis
the time to wait in milliseconds.
Description
Waits at most millis milliseconds for this thread to die. A timeout of 0 means to wait forever.

Exceptions
InterruptedException if another thread has interrupted the current thread.



Syntax 2
public final synchronized void join( long millis, int nanos ) throws InterruptedException
Parameters
millis
the time to wait in milliseconds.
nanos
0-999999 additional nanoseconds to wait.
Description
Waits at most millis milliseconds plus nanos nanoseconds for this thread to die.

Exceptions
IllegalArgumentException if the value of millis is negative the value of nanos is not in the range 0-999999.
Exceptions
InterruptedException if another thread has interrupted the current thread.



Syntax 3
public final void join() throws InterruptedException
Description
Waits for this thread to die.

Exceptions
InterruptedException if another thread has interrupted the current thread.