A thread pool is a fixed set of worker threads that pull tasks from a shared queue. You submit work, and an idle worker picks it up, runs it, then loops back for more. The workers live for the life of the program.
Reusing threads skips the cost of creating and destroying one per task. That setup, tens of microseconds each, adds up fast under load.
A pool also caps concurrency. You never launch ten thousand threads and exhaust memory or thrash the scheduler, because the queue absorbs bursts instead.
The tradeoff is sizing. Too few workers leave tasks waiting, and too many fight over cores. Use roughly the core count for compute, and more for I/O-bound work.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
The diagram below the answer is the concept . Jump to it ↓