update thread pool wait all worker threads finish