git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2572 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2005-05-06 22:15:12 +00:00
parent c11e16c494
commit 829e19e7ee
3 changed files with 5 additions and 6 deletions

View file

@ -249,7 +249,7 @@ class Cache (linkcheck.lock.AssertLock):
def add_connection (self, key, connection, timeout):
"""
Store open connection into cache for reuse.
Store open connection into pool for reuse.
"""
self.acquire()
try:
@ -259,11 +259,11 @@ class Cache (linkcheck.lock.AssertLock):
def release_connection (self, key):
"""
Store open connection into cache for reuse.
Remove connection from pool.
"""
self.acquire()
try:
return self.pool.release_connection(key)
self.pool.release_connection(key)
finally:
self.release()

View file

@ -117,7 +117,7 @@ class Consumer (linkcheck.lock.AssertLock):
tocheck = self.cache.incoming_len()
self.acquire()
try:
return self.threader.finished() and tocheck <= 0
return self.threader.finished() and tocheck == 0
finally:
self.release()
@ -157,10 +157,10 @@ class Consumer (linkcheck.lock.AssertLock):
"""
# avoid deadlock by requesting cache data before locking
tocheck = self.cache.incoming_len()
active = self.active_threads()
self.acquire()
try:
print >> stderr, _("Status:"),
active = self.threader.active_threads()
print_active(active)
print_links(self.logger.number)
print_tocheck(tocheck)

View file

@ -144,4 +144,3 @@ class Threader (object):
return "Threader with %d threads (max %d)" % \
(self.active_threads(), self.threads_max)