wait for handlers to quit before calling scheduler->on_exit_method