Skip to content
Permalink
Browse files

Remove hardcoded limitation of 50 local/remote concurrent jobs

  • Loading branch information...
Pavol Sakac authored and shawnl committed Jun 19, 2019
1 parent dc5f382 commit bd695b66ee5addca9f6362830ff20d4f81105171
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/where.c
@@ -173,11 +173,15 @@ static int dcc_lock_one(struct dcc_hostdef *hostlist,
int ret;

while (1) {
for (i_cpu = 0; i_cpu < 50; i_cpu++) {
for (i_cpu = 0; i_cpu < 10000; i_cpu++) {
char i_cpu_is_usable = 0;

for (h = hostlist; h; h = h->next) {
if (i_cpu >= h->n_slots)
continue;

i_cpu_is_usable = 1;

ret = dcc_lock_host("cpu", h, i_cpu, 0, cpu_lock_fd);

if (ret == 0) {
@@ -191,6 +195,9 @@ static int dcc_lock_one(struct dcc_hostdef *hostlist,
return ret;
}
}

if (!i_cpu_is_usable)
break;
}

dcc_lock_pause();

0 comments on commit bd695b6

Please sign in to comment.
You can’t perform that action at this time.