MCPcopy Create free account
hub / github.com/apache/arrow / operator()

Method operator()

cpp/src/arrow/util/async_util.h:427–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425 };
426
427 Result<Future<>> operator()() {
428 Future<> task = Future<>::Make();
429 // Consume as many items as we can (those that are already finished)
430 // synchronously to avoid recursion / stack overflow.
431 while (true) {
432 Future<T> next = state_holder->generator();
433 if (next.TryAddCallback(
434 [&] { return SubmitTaskCallback(std::move(state_holder), task); })) {
435 return task;
436 }
437 ARROW_ASSIGN_OR_RAISE(T item, next.result());
438 if (IsIterationEnd(item)) {
439 task.MarkFinished();
440 return task;
441 }
442 ARROW_RETURN_NOT_OK(state_holder->visitor(item));
443 }
444 }
445
446 std::string_view name() const { return state_holder->name; }
447

Callers

nothing calls this directly

Calls 6

SubmitTaskCallbackClass · 0.85
IsIterationEndFunction · 0.85
generatorMethod · 0.80
MakeFunction · 0.70
TryAddCallbackMethod · 0.45
MarkFinishedMethod · 0.45

Tested by

no test coverage detected