Added on_finished method in threadpool.Task