Skip to content
Snippets Groups Projects
Commit fd23f011 authored by Morris Jette's avatar Morris Jette
Browse files

Decrease pthread create retry sleep

If pthread_create call fails, decrease sleep before retry from
1 sec to 0.1 sec
parent c5b5491f
No related branches found
No related tags found
No related merge requests found
...@@ -541,7 +541,7 @@ extern int forward_msg(forward_struct_t *forward_struct, ...@@ -541,7 +541,7 @@ extern int forward_msg(forward_struct_t *forward_struct,
error("pthread_create error %m"); error("pthread_create error %m");
if (++retries > MAX_RETRIES) if (++retries > MAX_RETRIES)
fatal("Can't create pthread"); fatal("Can't create pthread");
sleep(1); /* sleep and try again */ usleep(100000); /* sleep and try again */
} }
slurm_attr_destroy(&attr_agent); slurm_attr_destroy(&attr_agent);
thr_count++; thr_count++;
...@@ -637,7 +637,7 @@ extern List start_msg_tree(hostlist_t hl, slurm_msg_t *msg, int timeout) ...@@ -637,7 +637,7 @@ extern List start_msg_tree(hostlist_t hl, slurm_msg_t *msg, int timeout)
error("pthread_create error %m"); error("pthread_create error %m");
if (++retries > MAX_RETRIES) if (++retries > MAX_RETRIES)
fatal("Can't create pthread"); fatal("Can't create pthread");
sleep(1); /* sleep and try again */ usleep(100000); /* sleep and try again */
} }
slurm_attr_destroy(&attr_agent); slurm_attr_destroy(&attr_agent);
......
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