This is an implementation of a very simple thread pool.