Add a while loop inside the stop method of ThreadPool class