From: Brian Warner Date: Tue, 7 Oct 2008 20:19:45 +0000 (-0700) Subject: util/limiter: add a repr X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/%22doc.html/architecture.txt?a=commitdiff_plain;h=93725a69353919b70ab1ed7a1dee8a99200d2f60;p=tahoe-lafs%2Ftahoe-lafs.git util/limiter: add a repr --- diff --git a/src/allmydata/util/limiter.py b/src/allmydata/util/limiter.py index aaee2c7d..d3222a7b 100644 --- a/src/allmydata/util/limiter.py +++ b/src/allmydata/util/limiter.py @@ -13,6 +13,10 @@ class ConcurrencyLimiter: self.pending = [] self.active = 0 + def __repr__(self): + return "" % (self.active, len(self.pending), + self.limit) + def add(self, cb, *args, **kwargs): d = defer.Deferred() task = (cb, args, kwargs, d)