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

Method operator()

cpp/src/arrow/util/async_generator.h:2137–2154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2135 : state_(std::make_shared<State>(std::move(source), std::move(or_value))) {}
2136
2137 Future<T> operator()() {
2138 if (state_->first) {
2139 state_->first = false;
2140 struct {
2141 T or_value;
2142
2143 Result<T> operator()(const T& value) {
2144 if (IterationTraits<T>::IsEnd(value)) {
2145 return std::move(or_value);
2146 }
2147 return value;
2148 }
2149 } Continuation;
2150 Continuation.or_value = std::move(state_->or_value);
2151 return state_->source().Then(std::move(Continuation));
2152 }
2153 return state_->source();
2154 }
2155
2156 private:
2157 struct State {

Callers

nothing calls this directly

Calls 2

ThenMethod · 0.80
sourceMethod · 0.80

Tested by

no test coverage detected