Search This Blog

Total Pageviews

How to find number of threads running in JVM?

Try this:

 ThreadGroup tgroup = Thread.currentThread().getThreadGroup();
 while(tgroup.getParent() != null) {
 tgroup = tgroup.getParent();
 Thread[] t = new Thread[tgroup.activeCount()];

No comments:

Best Client Optimized Programming Language for Mobile Development?

Use Google's Dart language, which is Object-oriented, class-based and garbage-collected language with C-Style.  Dart can compile to eith...