This is an early prototype of a thread pool library I had written using POSIX threads on Linux. To keep it simple, A user configured number of worker threads are created at the start of the pool. They wait on an input queue for the work (pthread_cond_wait). Once the work is available they pick up the work and put the results on the output queue. They use the mutexes for proper synchronization.