diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-10 15:38:40 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-10 15:38:40 +0200 |
commit | 7c36f3648e39ace752c67c71867693ce1eee52a3 (patch) | |
tree | 0e7a63fc98c40dfced395ab73dfc44c5e176ad42 /test/git/async | |
parent | 55e757928e493ce93056822d510482e4ffcaac2d (diff) | |
download | gitpython-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')
-rw-r--r-- | test/git/async/test_pool.py | 3 |
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 |