2015年4月

Java thread 线程的6种状态

public static enum State {
/** * A Thread which has not yet started.
/
NEW,
/
* * A Thread which is running or suspended.
/
RUNNABLE,
/
* * A Thread which is blocked on a monitor.
/
BLOCKED,
/
* * A Thread which is waiting with no timeout.
/
WAITING,
/
* * A Thread which is waiting with a timeout.
/
TIMED_WAITING,
/
* * A thread which is no longer alive.
*/
TERMINATED }