Skip to content

Commit 04eedc6

Browse files
author
Rafał Hibner
committed
Fix track running tasks
1 parent 97ade7e commit 04eedc6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/src/arrow/util/async_util.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@ class AsyncTaskSchedulerImpl : public AsyncTaskScheduler {
170170
if (IsAborted()) {
171171
return false;
172172
}
173-
running_tasks_set_.insert(task.get());
174173
SubmitTaskUnlocked(std::move(task), std::move(lk));
175174
return true;
176175
}
@@ -217,6 +216,8 @@ class AsyncTaskSchedulerImpl : public AsyncTaskScheduler {
217216
};
218217
})) {
219218
return OnTaskFinished(submit_result->status());
219+
} else {
220+
running_tasks_set_.insert(task.get());
220221
}
221222
}
222223

0 commit comments

Comments
 (0)