MCPcopy Create free account
hub / github.com/apache/arrow / OnTaskGroupFinished

Method OnTaskGroupFinished

cpp/src/arrow/acero/task_util.cc:225–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223}
224
225Status TaskSchedulerImpl::OnTaskGroupFinished(size_t thread_id, int group_id,
226 bool* all_task_groups_finished) {
227 bool aborted = aborted_.value.load();
228 {
229 std::lock_guard<std::mutex> lock(mutex_);
230
231 TaskGroup& task_group = task_groups_[group_id];
232 task_group.state_ = TaskGroupState::ALL_TASKS_FINISHED;
233 *all_task_groups_finished = true;
234 for (size_t i = 0; i < task_groups_.size(); ++i) {
235 if (task_groups_[i].state_ != TaskGroupState::ALL_TASKS_FINISHED) {
236 *all_task_groups_finished = false;
237 break;
238 }
239 }
240 }
241
242 if (aborted && *all_task_groups_finished) {
243 abort_cont_impl_();
244 return Status::Cancelled("Scheduler cancelled");
245 }
246 if (!aborted) {
247 RETURN_NOT_OK(task_groups_[group_id].cont_impl_(thread_id));
248 }
249 return Status::OK();
250}
251
252Status TaskSchedulerImpl::ExecuteMore(size_t thread_id, int num_tasks_to_execute,
253 bool execute_all) {

Callers

nothing calls this directly

Calls 4

CancelledFunction · 0.85
OKFunction · 0.50
loadMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected