Skip to content
Snippets Groups Projects
Commit cf4fa1d1 authored by Christopher J. Morrone's avatar Christopher J. Morrone
Browse files

Change if/else order for readability

parent b39cfc09
No related branches found
No related tags found
No related merge requests found
......@@ -280,7 +280,9 @@ void slurm_step_launch_wait_finish(slurm_step_ctx ctx)
/* Wait for all tasks to complete */
pthread_mutex_lock(&sls->lock);
while (bit_set_count(sls->tasks_exited) < sls->tasks_requested) {
if (sls->abort) {
if (!sls->abort) {
pthread_cond_wait(&sls->cond, &sls->lock);
} else {
if (!sls->abort_action_taken) {
slurm_kill_job_step(ctx->job_id,
ctx->step_resp->job_step_id,
......@@ -322,8 +324,6 @@ void slurm_step_launch_wait_finish(slurm_step_ctx ctx)
client_io_handler_abort(sls->client_io);
break;
}
} else {
pthread_cond_wait(&sls->cond, &sls->lock);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment