terminate after all threads finished