Java Concurrency - Thread Joins (Waiting thread completion)

Java Conceptuel Diagram

About

The join method is a execution suspension method. It allows one thread to wait for the completion of another.

If t is a Thread object whose thread is currently executing,

t.join();

Join causes the current thread to pause execution until t's thread terminates.

Overloads of join allow the programmer to specify a waiting period.

However, as with sleep, join is dependent on the OS for timing, so you should not assume that join will wait exactly as long as you specify.





Discover More
Java Conceptuel Diagram
Java Concurrency - (Thread) Execution Suspension

in java Thread.sleep Thread.join Object.wait Many methods that suspend execution throw an InterruptedException.
Java Conceptuel Diagram
Java Concurrency - Happens-before Relationship

in Java The following actions create happens-before relationships: synchronized construct. When a thread releases an intrinsic lock, a happens-before relationship is established between that action...
Thread Java Mission Control
Java Concurrency - Thread

Every application has at least one thread . From the application programmer's point of view, you start with just one thread, called the main thread. From this thread, you can start other threads. ...



Share this page:
Follow us:
Task Runner