When a thread completes its execution, it will be destroyed.
In Java thread pool implemenation, how does threads come back to ready state after executing the task.?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
When a thread completes its execution, it will be destroyed.
In Java thread pool implemenation, how does threads come back to ready state after executing the task.?
Can you give an example where the scenario you've suggested is a problem?
If you are curious about implementation of standard classes you can always have a look at the source code.
All standard classes of java are open source.
For example, you could start here:
GC: ThreadPoolExecutor - java.util.concurrent.ThreadPoolExecutor (.java) - GrepCode Class Source