| 348 | class CustomThrottle : public ThrottledAsyncTaskScheduler::Throttle { |
| 349 | public: |
| 350 | virtual std::optional<Future<>> TryAcquire(int amt) { |
| 351 | if (gate_.is_finished()) { |
| 352 | return std::nullopt; |
| 353 | } else { |
| 354 | return gate_; |
| 355 | } |
| 356 | } |
| 357 | virtual void Release(int amt) {} |
| 358 | void Unlock() { gate_.MarkFinished(); } |
| 359 | int Capacity() { return std::numeric_limits<int>::max(); } |
nothing calls this directly
no test coverage detected