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 660456c commit 3268ac0Copy full SHA for 3268ac0
taskvine/src/worker/vine_worker.c
@@ -1104,14 +1104,15 @@ then we need to abort to clean things up.
1104
1105
static void kill_all_tasks()
1106
{
1107
- struct vine_process *p;
1108
- uint64_t task_id;
+ uint64_t *task_ids = itable_keys_array(procs_table);
+ int total_tasks = itable_size(procs_table);
1109
1110
- ITABLE_ITERATE(procs_table, task_id, p)
1111
- {
1112
- do_kill(task_id);
+ for (int i = 0; i < total_tasks; i++) {
+ do_kill(task_ids[i]);
1113
}
1114
+ itable_free_keys_array(task_ids);
1115
+
1116
assert(itable_size(procs_table) == 0);
1117
assert(itable_size(procs_running) == 0);
1118
assert(itable_size(procs_complete) == 0);
0 commit comments