In a Java thread dump, you can see locks mentioned within stack traces.
There seems to be three kinds of information:
1:
- locked <0x00002aab329f7
In my opinion, the java.util.concurrent package almost use LockSupport.park() method to block thread, such as CountDownLatch, ReentrantLock which belong to abstractqueuedsynchronized framework. Thus, the 3rd scenario in your questions means your code finally calls LockSupport.park() method, for you use the concurrent class in java.util.concurrent package, the 2nd scenario means you use synchronized keywork and call wait() method explicitly.