Skip to content

Commit

Permalink
vine: link_poll handle whole buffer (#4054)
Browse files Browse the repository at this point in the history
* read in whole link buffer

* add break, formatting
  • Loading branch information
colinthomas-z80 authored Feb 6, 2025
1 parent 06e6b38 commit 7cd8da7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions taskvine/src/manager/vine_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -4991,14 +4991,17 @@ static int poll_active_workers(struct vine_manager *q, int stoptime)

BEGIN_ACCUM_TIME(q, time_status_msgs);

int i, j = 1;
int i;
int workers_failed = 0;
// Then consider all existing active workers
for (i = j; i < n; i++) {
for (i = 1; i < n; i++) {
if (q->poll_table[i].revents) {
if (handle_worker(q, q->poll_table[i].link) == VINE_WORKER_FAILURE) {
workers_failed++;
}
do {
if (handle_worker(q, q->poll_table[i].link) == VINE_WORKER_FAILURE) {
workers_failed++;
break;
}
} while (!link_buffer_empty(q->poll_table[i].link));
}
}

Expand Down

0 comments on commit 7cd8da7

Please sign in to comment.