projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d4749d
)
util/limiter: add a repr
author
Brian Warner
<warner@allmydata.com>
Tue, 7 Oct 2008 20:19:45 +0000
(13:19 -0700)
committer
Brian Warner
<warner@allmydata.com>
Tue, 7 Oct 2008 20:19:45 +0000
(13:19 -0700)
src/allmydata/util/limiter.py
patch
|
blob
|
history
diff --git
a/src/allmydata/util/limiter.py
b/src/allmydata/util/limiter.py
index aaee2c7d0bdbdccba543d32a6fe6d2e96d049ebb..d3222a7b41a24d9723ea74503dcd07d8fd50c697 100644
(file)
--- 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 "<Limiter with %d/%d/%d>" % (self.active, len(self.pending),
+ self.limit)
+
def add(self, cb, *args, **kwargs):
d = defer.Deferred()
task = (cb, args, kwargs, d)