int64_t Throttle::take(int64_t c)
{
- if (!max) {
+ if (max == 0u) {
return 0;
}
count += c;
int64_t Throttle::put(int64_t c)
{
- if (!max) {
+ if (max == 0u) {
return 0;
}
if (!c) {
seastar::future<> Throttle::get(size_t c)
{
- if (!max) {
+ if (max == 0u) {
return seastar::make_ready_future<>();
}
return on_free_slots.wait([this, c] {