How to change the name of threads in an ExecutorService?

You'll have to use an ExecutorService implementation that allows you to set the ThreadFactory 1 used to create threads, for example ThreadPoolExecutor Pass an instance that creates threads with the proper names.

You'll have to use an ExecutorService implementation that allows you to set the ThreadFactory1 used to create threads, for example, ThreadPoolExecutor. Pass an instance that creates threads with the proper names. There's also a handy class in commons-lang that allows to specify thread names with a pattern: BasicThreadFactory.

This keeps you from having to create a ThreadFactory subclass just to provide the naming behavior.

– Renato Dinhani Conceição May 25 at 15:00 @Renato, the only accessible library implementation is from the Executors utility class and it does not allow you to supply a name string. – Tim Bender May 25 at 21:58.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions