Esempio n. 1
0
 // Return thread IDs of deadlocked threads or null if any.
 // It finds deadlocks involving only monitors if it's a Tiger VM.
 // Otherwise, it finds deadlocks involving both monitors and
 // the concurrent locks.
 public long[] findDeadlockedThreads() throws IOException {
   ThreadMXBean tm = getThreadMXBean();
   if (supportsLockUsage && tm.isSynchronizerUsageSupported()) {
     return tm.findDeadlockedThreads();
   } else {
     return tm.findMonitorDeadlockedThreads();
   }
 }