We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abbff8d commit af9a418Copy full SHA for af9a418
taskvine/src/worker/vine_worker.c
@@ -1103,14 +1103,15 @@ then we need to abort to clean things up.
1103
1104
static void kill_all_tasks()
1105
{
1106
- struct vine_process *p;
1107
- uint64_t task_id;
+ uint64_t *task_ids = itable_keys_array(procs_table);
+ int total_tasks = itable_size(procs_table);
1108
1109
- ITABLE_ITERATE(procs_table, task_id, p)
1110
- {
1111
- do_kill(task_id);
+ for (int i = 0; i < total_tasks; i++) {
+ do_kill(task_ids[i]);
1112
}
1113
+ itable_free_keys_array(task_ids);
1114
+
1115
assert(itable_size(procs_table) == 0);
1116
assert(itable_size(procs_running) == 0);
1117
assert(itable_size(procs_complete) == 0);
0 commit comments