use of com.ibm.j9ddr.corereaders.osthread.IOSThread in project openj9 by eclipse.
the class J9ThreadHelper method getThreadMap.
private static Map<Long, IOSThread> getThreadMap() throws CorruptDataException {
Map<Long, IOSThread> thrMap = null;
if (cachedThreads != null) {
thrMap = cachedThreads.get();
}
if (thrMap != null) {
return thrMap;
}
/*
* There was no cache of threads, populate a new one while we find the
* thread the caller wanted.
*/
thrMap = new TreeMap<Long, IOSThread>();
for (IOSThread thread : DataType.getProcess().getThreads()) {
thrMap.put(thread.getThreadId(), thread);
}
cachedThreads = new WeakReference<Map<Long, IOSThread>>(thrMap);
return thrMap;
}
Aggregations