Thread Pool

Noun · Development

Definitions

  1. A collection of pre-created worker threads that process tasks from a shared queue. Eliminates the overhead of creating/destroying threads per request (which costs ~1ms). The pool size is typically tuned to the number of CPU cores (for CPU-bound work) or much larger (for I/O-bound work). Java's ExecutorService, Go's goroutine scheduler, and Python's ThreadPoolExecutor are implementations.

    In plain English: A fixed group of reusable worker threads that pick up tasks from a queue, avoiding the cost of creating new threads.

    Example: "Set the thread pool to 4× CPU cores for I/O-bound work -- threads spend most of their time waiting on database responses anyway."

Related Terms