Check for thr->work_restart in restart_wait.