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

Function MakeContinuation

cpp/src/arrow/acero/task_util_test.cc:77–86  ·  view source on GitHub ↗

If this is the last task group then start the next stage

Source from the content-addressed store, hash-verified

75Status FastTaskImpl(std::size_t, int64_t) { return Status::OK(); }
76// If this is the last task group then start the next stage
77TaskScheduler::TaskGroupContinuationImpl MakeContinuation(
78 std::atomic<int>* counter, std::function<void(std::size_t, int)> start_next_stage,
79 int next_stage) {
80 return [counter, start_next_stage, next_stage](std::size_t thread_id) {
81 if (counter->fetch_sub(1) == 1) {
82 start_next_stage(thread_id, next_stage);
83 }
84 return Status::OK();
85 };
86}
87// Signal the cv if this is the last group
88TaskScheduler::TaskGroupContinuationImpl MakeFinalContinuation(
89 std::atomic<int>* counter, std::mutex* mutex, std::condition_variable* finish) {

Callers 1

TESTFunction · 0.85

Calls 1

OKFunction · 0.50

Tested by

no test coverage detected