< prev index next >
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/DeadlockDetector.java
Print this page
rev 54717 : imported patch 8223306
@@ -144,14 +144,11 @@
private static ObjectHeap heap;
private static HashMap threadTable;
private static void createThreadTable() {
threadTable = new HashMap();
- for (JavaThread cur = threads.first(); cur != null; cur = cur.next()) {
- // initialize dfn for each thread to -1
- threadTable.put(cur, new Integer(-1));
- }
+ VM.getVM().getThreads().doJavaThreads((thread) -> threadTable.put(thread, new Integer(-1)));
}
private static int dfn(JavaThread thread) {
Object obj = threadTable.get(thread);
if (obj != null) {
< prev index next >