
Thread Pool
A thread pool is a collection of pre-created threads that are ready to perform tasks as needed. Instead of creating and destroying a thread for each job, which can be inefficient, a thread pool manages a fixed number of threads that wait for tasks. When a new task arrives, it is assigned to an available thread in the pool. This approach improves performance and resource management by reducing the overhead of thread creation and destruction, allowing multiple tasks to run concurrently while maintaining control over system resources.