A ThreadFactory which creates non-daemon threads with a name indicating which pool they came
from.
A new ThreadGroup is created with the passed-in name, as a sub-group of whichever thread
creates the factory. Each new thread will be a member of this group, and have a unique name
including the group name and an increasing number. The idea is to make it easy to identify
members of a thread group in debug output.
For example, a NamedPoolThreadFactory with the name "writer" will create a ThreadGroup named
"writer" and new threads will be named "writer-1", "writer-2", etc.
A ThreadFactory which creates non-daemon threads with a name indicating which pool they came from.
A new ThreadGroup is created with the passed-in name, as a sub-group of whichever thread creates the factory. Each new thread will be a member of this group, and have a unique name including the group name and an increasing number. The idea is to make it easy to identify members of a thread group in debug output.
For example, a NamedPoolThreadFactory with the name "writer" will create a ThreadGroup named "writer" and new threads will be named "writer-1", "writer-2", etc.