- 论坛徽章:
- 15
|
time不待人 发表于 2012-05-07 15:46
java dump中的很多线程处于state:CW和state:B状态,他们之间有什么区别吗?
The values of state can be:
R - Runnable - the thread is able to run when given the chance.
CW - Condition Wait - the thread is waiting. For example, because:
A sleep() call is made
The thread has been blocked for I/O
A wait() method is called to wait on a monitor being notified
The thread is synchronizing with another thread with a join() call
S – Suspended – the thread has been suspended by another thread.
Z – Zombie – the thread has been killed.
P – Parked – the thread has been parked by the new concurrency API (java.util.concurrent).
B – Blocked – the thread is waiting to obtain a lock that something else currently owns. |
|