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.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to