ThreadPool refactor.