Implement thread pool

Elaborate implementation of a thread pool?

E

Expert

Verified

Public class Thread Pool implements ThreadPoolInt

This class is a common implementation of a thread pool that takes the input like as

i.) Size of a pool to be constructed

ii.) Name of the class that implements Runnable and constructs a thread pool with active threads which are waiting for the activation. Once the threads have finished processing they return and wait again in the pool.

The thread pool engine may be locked that is, if some inner operation is performed on the pool then it is better that the thread engine be locked. Locking make sure that no new threads are supplied by the engine. Yet, the currently executing threads are allowable to continue till they come back to the passivePool.

   Related Questions in JAVA Programming

©TutorsGlobe All rights reserved 2022-2023.