Mark,
On 10/26/21 15:56, Mark Thomas wrote:
On 26/10/2021 09:47, Poison wrote:
Thank you for your detailed explanation. Now I understand the
background of this part of the comment. When corePoolSize is equal to
maxThreads, the native implementation will create threads first.
There is another question. Why does
org.apache.tomcat.util.threads.ThreadPoolExecutor almost copy the code
of java.util.concurrent.ThreadPoolExecutor instead of implementing it
by inheriting java.util.concurrent.ThreadPoolExecutor? This is what I
don't understand. Hope you can explain the design concept behind,
thank you.
j.u.c.ThreadPoolExecutor isn't designed in a way we can extend it and
change the things we need to change. Copying it was the only option.
It's interesting that the original license of the sources created for
JSR-166 were released to the public domain aka claiming "no copyright".
Subsequently, Oracle added the GPL license (to match the Java source
code policy) and, similarly yet separately, the ASF added an AL2 to
another copy of the code.
So virtually the same code is available under 2 licenses as well as "do
whatever you want" terms, separately.
Odd.
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org