NOTE
6.40 Thread States
Java threads transition between execution states. These notes use the thread-state enumeration and a state diagram to organize those relationships.
This is a historical learning note and may contain outdated or incomplete understanding.
1. Thread State Enum
public enum State {
// A Thread after new, before start
NEW,
// A Thread after start; it may not have obtained the CPU yet
RUNNABLE,
// A Thread waiting for a monitor
BLOCKED,
// A thread in the waiting state after calling Object.wait(),
// Thread.join, or LockSupport.park()
WAITING,
// A thread after calling Thread.sleep, Object.wait(long),
// Thread.join(long), LockSupport.parkNanos, or LockSupport.parkUntil
TIMED_WAITING,
// A thread that has finished running
TERMINATED;
}
2. State Transitions

3. References
Drag to pan, scroll to zoom, and click a node to expand or collapse it. Large maps start with deeper levels collapsed; click nodes to expand them.
Discussion
Sign in with GitHub to comment. Discussions are stored as GitHub Issues.View on GitHub