Pool

This lesson discusses the various APIs and their working for both thread and process pools.

We'll cover the following...

Pool

The Pool object consists of a group of processes that can receive tasks for execution. The concept is very similar to a thread pool. Creating and tearing down threads is expensive so most programming language frameworks provide a notion of a pool of threads. Once a thread is done executing a task, it is returned back to the pool rather than being terminated. The process pool concept is similar where the processes are kept alive till there are tasks to be executed. Let's dive into an example to see how the Pool class works. Consider the code below: ...