Public static enum thread.state extends enum<thread.state> thread state.
A thread can be in one of the following states:
The state of a thread that has not been started by 1.NEW to date.
2.RUNNABLE The thread state of a thread that can run.
A thread in a running state is running in a Java virtual machine, but it may be waiting for other resources in the operating system, such as a processor.
3.BLOCKED is blocked and waiting for a thread state of the monitor lock.
A thread in a blocked state is waiting for a monitor lock to enter a synchronized block/method, or to enter the synchronized block/method again after calling Object.wait.
4.WAITING The thread state of a waiting thread. A thread is waiting because it calls one of the following methods:
- Object.wait with no time-out value
- Thread.Join with no time-out value
Locksupport.park
A thread that is waiting waits for another thread to perform a specific operation.
For example, a thread that has already called object.wait () on an object is waiting for another thread to call Object.notify () or Object.notifyall () on that object.
A thread that has already called thread.join () is waiting for the specified thread to terminate.
5.timed_waiting The thread state of a waiting thread with a specified wait time. A thread is in a timed wait state because it calls one of the following methods with the specified positive wait time:
- Thread.Sleep
- Object.wait with time-out value
- Thread.Join with time-out value
- Locksupport.parknanos
- Locksupport.parkuntil
6.TERMINATED
The thread state of the thread that has been terminated. The thread has finished executing.
Note: At a given point in time, a thread can only be in one state. These states are virtual machine states, and they do not reflect all operating system thread states.
To show the state of the thread at run time and its transformation, I drew the following diagram
Http://www.blogjava.net/cpegtop/articles/377980.html
Java Thread Status (GO)