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

Class State

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

MakeFunction · 0.70

Tested by

no test coverage detected