0

When I look at Java's Thread.State enum, I see that there are following thread states-
NEW, RUNNABLE, WAITING, TIMED_WAITING, BLOCKED and TERMINATED.

I've always read and heard that whenever thread finishes its execution, it terminates. So how ThreadPool manages to renew the existing worker thread after its execution of current task completes? Is there any additional thread state in case of ThreadPool?

shankulk
  • 534
  • 1
  • 4
  • 23
  • Are you aware that you can install the source together with the JDK and see for yourself? – Mark Rotteveel Apr 05 '18 at 15:29
  • Since you've marked it 'duplicate', can you point me to the original question where it has been answered? I've taken look at Java's sourcecode and have failed to understand how it is achieved hence the question. – shankulk Apr 05 '18 at 15:39
  • The duplicate is linked at the top of your question. – Mark Rotteveel Apr 06 '18 at 18:01

0 Answers0