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

Class State

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

Source from the content-addressed store, hash-verified

821
822 private:
823 struct State {
824 State(AsyncGenerator<T> source_generator, int max_readahead)
825 : source_generator(std::move(source_generator)), max_readahead(max_readahead) {}
826
827 void MarkFinishedIfDone(const T& next_result) {
828 // ASSERT_HELD(mutex)
829 if (IsIterationEnd(next_result)) {
830 finished = true;
831 }
832 }
833
834 AsyncGenerator<T> source_generator;
835 int max_readahead;
836 Future<> final_future = Future<>::Make();
837 int num_running{0}; // GUARDED_BY(mutex)
838 bool finished{false}; // GUARDED_BY(mutex)
839 arrow::util::Mutex mutex;
840 std::queue<Future<T>> readahead_queue;
841 };
842
843 std::shared_ptr<State> state_;
844};

Callers

nothing calls this directly

Calls 1

MakeFunction · 0.70

Tested by

no test coverage detected