From 26a4d0eacfc7b2005858a5779891ff1e21255fcb Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 8 Jun 2010 15:36:55 -0700 Subject: [PATCH] throttle: allow take(0) --- src/common/Throttle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/Throttle.h b/src/common/Throttle.h index d6735dd864fd3..b1c82b55c8752 100644 --- a/src/common/Throttle.h +++ b/src/common/Throttle.h @@ -62,7 +62,7 @@ public: } int64_t take(int64_t c = 1) { - assert(c > 0); + assert(c >= 0); Mutex::Locker l(lock); count += c; return count; -- 2.39.5