Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to find Number of working threads using java executor framework

807580Nov 3 2009 — edited Nov 3 2009
I'm creating a java thread pool using java 1.5 executor framework.
private ExecutorService executorService = Executors.newFixedThreadPool(threadPoolSize);
public <T> Future<T> submit(Callable<T> task) {
		return executorService.submit(task);
}
Now I want to get the number of working thread at runtime. Is there any java api available to do this using java 1.5 executor framework?

Thanks,
Arpan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 1 2009
Added on Nov 3 2009
1 comment
387 views