| 40 | : max_concurrent_cost_(max_concurrent_cost), available_cost_(max_concurrent_cost) {} |
| 41 | |
| 42 | ~ThrottleImpl() { |
| 43 | if (backoff_.is_valid()) { |
| 44 | backoff_.MarkFinished(Status::Cancelled("Throttle destroyed while paused")); |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | std::optional<Future<>> TryAcquire(int amt) override { |
| 49 | std::lock_guard<std::mutex> lk(mutex_); |
nothing calls this directly
no test coverage detected