| 73 | } |
| 74 | |
| 75 | void Resume() override { |
| 76 | std::unique_lock lk(mutex_); |
| 77 | paused_ = false; |
| 78 | // Might be a useless notification if our current cost is full |
| 79 | // or no one is waiting but it should be ok. |
| 80 | NotifyUnlocked(std::move(lk)); |
| 81 | } |
| 82 | |
| 83 | int Capacity() override { return max_concurrent_cost_; } |
| 84 |