| 1721 | class BackgroundGenerator { |
| 1722 | public: |
| 1723 | explicit BackgroundGenerator(Iterator<T> it, internal::Executor* io_executor, int max_q, |
| 1724 | int q_restart) |
| 1725 | : state_(std::make_shared<State>(io_executor, std::move(it), max_q, q_restart)), |
| 1726 | cleanup_(std::make_shared<Cleanup>(state_.get())) {} |
| 1727 | |
| 1728 | Future<T> operator()() { |
| 1729 | auto guard = state_->mutex.Lock(); |