+ Adding removeThread(Thread) to allow instrumentation libraries to track removal of threads from Pool. Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
61c2bb362a
commit
1f835b9f23
|
@ -554,6 +554,11 @@ public class QueuedThreadPool extends ContainerLifeCycle implements SizedThreadP
|
|||
return new Thread(_threadGroup, runnable);
|
||||
}
|
||||
|
||||
protected void removeThread(Thread thread)
|
||||
{
|
||||
_threads.remove(thread);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(Appendable out, String indent) throws IOException
|
||||
{
|
||||
|
@ -739,7 +744,7 @@ public class QueuedThreadPool extends ContainerLifeCycle implements SizedThreadP
|
|||
if (_threadsStarted.decrementAndGet()<getMaxThreads())
|
||||
startThreads(1);
|
||||
}
|
||||
_threads.remove(Thread.currentThread());
|
||||
removeThread(Thread.currentThread());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue