| 164 | } |
| 165 | |
| 166 | bool AddTask(std::unique_ptr<Task> task) override { |
| 167 | std::unique_lock<std::mutex> lk(mutex_); |
| 168 | if (stop_token_.IsStopRequested()) { |
| 169 | AbortUnlocked(stop_token_.Poll(), std::move(lk)); |
| 170 | } |
| 171 | if (IsAborted()) { |
| 172 | return false; |
| 173 | } |
| 174 | SubmitTaskUnlocked(std::move(task), std::move(lk)); |
| 175 | return true; |
| 176 | } |
| 177 | |
| 178 | Future<> OnFinished() const { return finished_; } |
| 179 | const tracing::Span& span() const override { return span_; } |
nothing calls this directly
no test coverage detected