job_coordinator: serialize the termination of different stages.