remove the thread pool