(Parallel) To retreive all the Thread Ids of active Threads
Set<Thread> threadSet = Thread.getAllStackTraces().keySet();
Thread[] threadArray = threadSet.toArray(new Thread[threadSet.size()]);
Reference
http://stackoverflow.com/questions/1323408/get-a-list-of-all-threads-currently-running-in-java
No comments:
Post a Comment