Issue #4121 QueuedThreadPool

ThreadFactory semantic

Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
Greg Wilkins 2019-10-02 15:27:34 +10:00
parent c37a4ff99d
commit 7b306d75e1
1 changed files with 5 additions and 4 deletions

View File

@ -636,9 +636,6 @@ public class QueuedThreadPool extends ContainerLifeCycle implements SizedThreadP
try
{
Thread thread = newThread(_runnable);
thread.setDaemon(isDaemon());
thread.setPriority(getThreadsPriority());
thread.setName(_name + "-" + thread.getId());
if (LOG.isDebugEnabled())
LOG.debug("Starting {}", thread);
_threads.add(thread);
@ -670,7 +667,11 @@ public class QueuedThreadPool extends ContainerLifeCycle implements SizedThreadP
protected Thread newThread(Runnable runnable)
{
return new Thread(_threadGroup, runnable);
Thread thread = new Thread(_threadGroup, runnable);
thread.setDaemon(isDaemon());
thread.setPriority(getThreadsPriority());
thread.setName(_name + "-" + thread.getId());
return thread;
}
protected void removeThread(Thread thread)