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

Method operator()

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

Source from the content-addressed store, hash-verified

149 : state_(std::make_shared<State>(std::move(source), std::move(map))) {}
150
151 Future<V> operator()() {
152 auto future = Future<V>::Make();
153 bool should_trigger;
154 {
155 auto guard = state_->mutex.Lock();
156 if (state_->finished) {
157 return AsyncGeneratorEnd<V>();
158 }
159 should_trigger = state_->waiting_jobs.empty();
160 state_->waiting_jobs.push_back(future);
161 }
162 if (should_trigger) {
163 state_->source().AddCallback(Callback{state_});
164 }
165 return future;
166 }
167
168 private:
169 struct State {

Callers

nothing calls this directly

Calls 6

push_backMethod · 0.80
sourceMethod · 0.80
MakeFunction · 0.70
LockMethod · 0.45
emptyMethod · 0.45
AddCallbackMethod · 0.45

Tested by

no test coverage detected