add function threadpool_all_done to judge all task whether has been done