Skip to content

Commit

Permalink
Issue #4121 QueuedThreadPool
Browse files Browse the repository at this point in the history
ThreadFactory semantic

Signed-off-by: Greg Wilkins <gregw@webtide.com>
  • Loading branch information
gregw committed Oct 2, 2019
1 parent c37a4ff commit 7b306d7
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -636,9 +636,6 @@ protected void startThread()
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);
Expand Down Expand Up @@ -670,7 +667,11 @@ private boolean addCounts(int deltaThreads, int deltaIdle)

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)
Expand Down

0 comments on commit 7b306d7

Please sign in to comment.