{{theTime}}

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()];
 tgroup.enumerate(t);

No comments:

How to install Windows Subsystem for Linux?

- Open Powershell in Admin mode and run wsl --install