I have a Java application that uses the Executor
framework and I have code that looks like this
protected ScheduledExecutorService scheduledExecutorService = new ScheduledThreadPoolExecutor(5)
My understanding is that internally the JVM would create a pool of 5 threads. Now when I check the execution in a profiler, I get something like thread-pool2,thread-pool3
and so on.
Some of these thread pools are created by the server and some are created by me
, I need a way to differentiate which were created by me and which were created by the server.
I am thinking that if I can name the thread pools it should do the trick, however do not see any API which would allow me to do the same.
Thanks in advance.