Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 81227

Get thread count of current instance

$
0
0

Hi,

I was wondering if there is a way to retrieve the thread count of the current instance/runtime without resulting in a security exception. I have tried code like:

int nbRunning = 0;
		for (Thread t : Thread.getAllStackTraces().keySet()) {
		    if (t.getState()==Thread.State.RUNNABLE) nbRunning++;
		}

// and

int thc = Thread.activeCount();

Thanks...


Viewing all articles
Browse latest Browse all 81227

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>