| 206 | } |
| 207 | |
| 208 | void StopProducing() { |
| 209 | if (!started_) { |
| 210 | started_ = true; |
| 211 | finished_.MarkFinished(Status::Invalid( |
| 212 | "StopProducing was called before StartProducing. The plan never ran.")); |
| 213 | } |
| 214 | EVENT(span_, "StopProducing"); |
| 215 | bool expected = false; |
| 216 | if (stopped_.compare_exchange_strong(expected, true)) { |
| 217 | query_context()->scheduler()->Abort( |
| 218 | [this]() { StopProducingImpl(sorted_nodes_.begin(), sorted_nodes_.end()); }); |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | template <typename It> |
| 223 | void StopProducingImpl(It begin, It end) { |
nothing calls this directly
no test coverage detected