summaryrefslogtreecommitdiff
path: root/lib/git/async
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-10 12:06:16 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-10 12:06:16 +0200
commit01eac1a959c1fa5894a86bf11e6b92f96762bdd8 (patch)
tree85d31f4a4d342f5a3521399e301657eacb1036b9 /lib/git/async
parentcfb278d74ad01f3f1edf5e0ad113974a9555038d (diff)
downloadgitpython-01eac1a959c1fa5894a86bf11e6b92f96762bdd8.tar.gz
Added more dependency task tests, especially the single-reads are not yet fully deterministic as tasks still run into the problem that they try to write into a closed channel, it was closed by one of their task-mates who didn't know someone else was still computing
Diffstat (limited to 'lib/git/async')
-rw-r--r--lib/git/async/task.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/git/async/task.py b/lib/git/async/task.py
index d5b45609..0b1d0666 100644
--- a/lib/git/async/task.py
+++ b/lib/git/async/task.py
@@ -84,9 +84,9 @@ class OutputChannelTask(Node):
def process(self, count=0):
"""Process count items and send the result individually to the output channel"""
- print "%r: reading %i" % (self.id, count)
+ # print "%r: reading %i" % (self.id, count)
items = self._read(count)
- print "%r: done reading" % self.id
+ # print "%r: done reading %i items" % (self.id, len(items))
try:
# increase the ref-count - we use this to determine whether anyone else
# is currently handling our output channel. As this method runs asynchronously,
@@ -109,7 +109,6 @@ class OutputChannelTask(Node):
# END handle single apply
except Exception, e:
print >> sys.stderr, "task %s error:" % self.id, type(e), str(e) # TODO: REMOVE DEBUG, or make it use logging
-
# be sure our task is not scheduled again
self.set_done()
@@ -153,7 +152,7 @@ class OutputChannelTask(Node):
# + 1 for the instance we provide to refcount
# Soft close, so others can continue writing their results
if self.is_done() and getrefcount(self._out_wc) < 4:
- print "Closing channel of %r" % self.id
+ # print "Closing channel of %r" % self.id
self.close()
# END handle channel closure
#{ Configuration