Re: Thread.getState() very slow

2010-07-10 Thread David Holmes
Hi Doug, Doug Lea said the following on 07/10/10 23:35: I've been trying out some improvements in ForkJoin that involve repeatedly scanning threads to check whether they are still in state Thread.State.RUNNABLE. My question is why you want to check for Runnable? Is this a heuristic check to s

Thread.getState() very slow

2010-07-10 Thread Doug Lea
I've been trying out some improvements in ForkJoin that involve repeatedly scanning threads to check whether they are still in state Thread.State.RUNNABLE. This is shockingly slow because getState() is implemented using a lookup table that requires a global lock (to ensure initialization) plus bo