Finish when all tasks are idle