finish threadpool