Skip to content

Commit 8b5a4b8

Browse files
JinZhou5042Jin Zhou
andauthored
traverse w->current_libraries instead of w->current_tasks (#4262)
Co-authored-by: Jin Zhou <[email protected]>
1 parent e3b574f commit 8b5a4b8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

taskvine/src/manager/vine_manager.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3067,12 +3067,12 @@ static void find_max_worker(struct vine_manager *q)
30673067
* are not counted towards the resources in use and will be killed if needed. */
30683068
static void kill_empty_libraries_on_worker(struct vine_manager *q, struct vine_worker_info *w, struct vine_task *t)
30693069
{
3070-
uint64_t task_id;
3071-
struct vine_task *task;
3072-
ITABLE_ITERATE(w->current_tasks, task_id, task)
3070+
uint64_t libtask_id;
3071+
struct vine_task *libtask;
3072+
ITABLE_ITERATE(w->current_libraries, libtask_id, libtask)
30733073
{
3074-
if (task->provides_library && task->function_slots_inuse == 0 && (!t->needs_library || strcmp(t->needs_library, task->provides_library))) {
3075-
vine_cancel_by_task_id(q, task->task_id);
3074+
if (libtask->function_slots_inuse == 0 && (!t->needs_library || strcmp(t->needs_library, libtask->provides_library))) {
3075+
vine_cancel_by_task_id(q, libtask_id);
30763076
}
30773077
}
30783078
}

0 commit comments

Comments
 (0)