| 584 | private: |
| 585 | struct State { |
| 586 | State(AsyncGenerator<T> source, int max_readahead) |
| 587 | : first_(true), |
| 588 | source_(std::move(source)), |
| 589 | finished_(false), |
| 590 | // There is one extra "space" for the in-flight request |
| 591 | spaces_available_(max_readahead + 1), |
| 592 | // The SPSC queue has size-1 "usable" slots so we need to overallocate 1 |
| 593 | readahead_queue_(max_readahead + 1) {} |
| 594 | |
| 595 | Status Pump(const std::shared_ptr<State>& self) { |
| 596 | // Can't do readahead_queue.write(source().Then(...)) because then the |
nothing calls this directly
no outgoing calls
no test coverage detected