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