jconsole線程面板中的阻塞總數和等待總數(轉)


阻塞總數

Blocked count is the total number of times that the thread blocked to enter or reenter a monitor. I.e. the number of times a thread has been in the java.lang.Thread.State.BLOCKED state.

等待總數

Waited count is the total number of times that the thread waited for notification. i.e. the number of times that a thread has been in the ava.lang.Thread.State.WAITING or java.lang.Thread.State.TIMED_WAITING state.

 

當線程試圖獲取一個內部的對象鎖(不是java.util.concurrent庫中的鎖),而鎖被其它線程占有,則該線程進入阻塞狀態。

當線程等待另外一個線程通知調度器的一個條件的時候,它自己進入等待狀態。在調用Object.wait()或Thread.join()方法,或者等待java.util.concurrent庫中的Lock或Condition時,會出現等待狀況

http://blog.csdn.net/mangmang2012/article/details/7106692

http://stackoverflow.com/questions/7170235/what-does-blocked-count-and-waited-count-in-a-java-thread-mean

 

 

關於jconsole的線程監控參數blocked Count ,Waited Count

詳細概念見 java.lang.management.ThreadInfo
 
 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM