Skip to content

Commit e14e3f1

Browse files
committed
Removed commented-out debug code and additional debug printings. Verified it works on py2.4, 2.5 and 2.6
1 parent 1873db4 commit e14e3f1

File tree

4 files changed

+0
-14
lines changed

4 files changed

+0
-14
lines changed

lib/git/async/pool.py

-6
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ def read(self, count=0, block=True, timeout=None):
9595
# provided enough - its better to have some possibly empty task runs
9696
# than having and empty queue that blocks.
9797

98-
# NOTE: TODO: that case is only possible if one Task could be connected
99-
# to multiple input channels in a manner known by the system. Currently
100-
# this is not possible, but should be implemented at some point.
101-
10298
# if the user tries to use us to read from a done task, we will never
10399
# compute as all produced items are already in the channel
104100
task = self._task_ref()
@@ -260,8 +256,6 @@ def _prepare_channel_read(self, task, count):
260256
# the following loops are kind of unrolled - code duplication
261257
# should make things execute faster. Putting the if statements
262258
# into the loop would be less code, but ... slower
263-
# DEBUG
264-
# print actual_count, numchunks, chunksize, remainder, task._out_writer.size()
265259
if self._num_workers:
266260
# respect the chunk size, and split the task up if we want
267261
# to process too much. This can be defined per task

lib/git/async/task.py

-6
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,7 @@ def process(self, count=0):
8888
self._num_writers += 1
8989
self._wlock.release()
9090

91-
#print "%r: reading %i" % (self.id, count)
92-
#if hasattr(self, 'reader'):
93-
# print "from", self.reader().channel
9491
items = self._read(count)
95-
#print "%r: done reading %i items" % (self.id, len(items))
9692

9793
try:
9894
try:
@@ -117,7 +113,6 @@ def process(self, count=0):
117113
self._wlock.release()
118114
# END handle writer count
119115
except Exception, e:
120-
print >> sys.stderr, "task %s error:" % self.id, type(e), str(e) # TODO: REMOVE DEBUG, or make it use logging
121116
# be sure our task is not scheduled again
122117
self.set_done()
123118

@@ -164,7 +159,6 @@ def process(self, count=0):
164159
self._wlock.acquire()
165160
try:
166161
if self._num_writers == 0:
167-
# print "Closing channel of %r" % self.id, len(self._out_writer.channel.queue), self._out_writer.channel
168162
self.close()
169163
# END handle writers
170164
finally:

lib/git/async/util.py

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from threading import (
44
Lock,
5-
current_thread,
65
_allocate_lock,
76
_Condition,
87
_sleep,

test/git/async/test_pool.py

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class TestThreadPool(TestBase):
1919

2020
def _assert_single_task(self, p, async=False):
2121
"""Performs testing in a synchronized environment"""
22-
# return # DEBUG TODO: Fixme deactivated it
2322
print >> sys.stderr, "Threadpool: Starting single task (async = %i) with %i threads" % (async, p.size())
2423
null_tasks = p.num_tasks() # in case we had some before
2524

0 commit comments

Comments
 (0)