What is ThreadPool

A thread pool is a software design pattern used to achieve concurrent or Parallel execution. Instead of spawning a brand-new OS or Green thread every time a task arrives (and destroying it when it finishes), a thread pool pre-creates a fixed or managed number of worker threads.
These worker threads sit in an idle state, pulling tasks out of a shared queue, executing them, and then going back for more. This drastically cuts down on the CPU overhead, memory consumption, and latency caused by constant thread creation and destruction.