[Java concurrent programming] 14. Thread, Thread description, javathread
Thread status: New, Runnable, Blocked, Waiting, Timed waiting, Terminated
1. RUNNABLE, corresponding to the "ready" and "running" statuses. That is to say, a Thread in the ready and running status is displayed as "RUNNABLE" in java. lang. Thread"
2. BLOCKED, corresponding to the "blocking" status. This thread needs to obtain a lock to continue execution, and this lock is currently held by other threads, so it enters the passive waiting status, it is not until the lock is obtained that it enters the "ready" status again.
3. WAITING, corresponding to the "blocking" status, indicates that the thread is WAITING for an indefinite period of time until someone wakes it up and it enters the ready state again.
4. TIMED_WAITING, corresponding to the "blocking" status, indicates that the thread is waiting for a certain period of time, or someone will wake it up, or wait for a certain amount of time before it enters the ready state again.