summaryrefslogtreecommitdiff
path: root/test/git/async/test_pool.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-10 15:38:40 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-10 15:38:40 +0200
commit7c36f3648e39ace752c67c71867693ce1eee52a3 (patch)
tree0e7a63fc98c40dfced395ab73dfc44c5e176ad42 /test/git/async/test_pool.py
parent55e757928e493ce93056822d510482e4ffcaac2d (diff)
downloadgitpython-7c36f3648e39ace752c67c71867693ce1eee52a3.tar.gz
Now tracking the amount of concurrent writers to assure the channel is closed only when there is no one else writing to it. This assures that all tasks can continue working, and put their results accordingly. Shutdown is still not working correctly, but that should be solvable as well. Its still not perfect though ...
Diffstat (limited to 'test/git/async/test_pool.py')
-rw-r--r--test/git/async/test_pool.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/git/async/test_pool.py b/test/git/async/test_pool.py
index d34f6773..7cb94a86 100644
--- a/test/git/async/test_pool.py
+++ b/test/git/async/test_pool.py
@@ -42,7 +42,7 @@ class _TestTaskBase(object):
print self.item_count, fc
assert self.item_count == fc
self.lock.release()
-
+ assert self._num_writers == 0
return self
@@ -381,6 +381,7 @@ class TestThreadPool(TestBase):
st = time.time()
items = rcs[-1].read()
elapsed = time.time() - st
+ print len(items), ni
assert len(items) == ni
del(rcs)
assert pool.num_tasks() == 0 # tasks depleted, all done, no handles