Using a dynamic threadpool