Adding a thread pool class.