Thread Pools A thread pool is a set of threads, all executing the same code, and competing to handle requests coming from a queue of requests. We could pre-allocate all threads in the pool, or we could modify their number according to the work-load. We need a way to tell all threads in the pool when to terminate (when the program exits, or when the requests handling was completely done). We need to make sure that fetching a request from the queue is an efficient operation - i.e. not waking up all thread in the pool in order to have one take the request and the rest go to sleep again.