diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-11 20:13:21 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-11 20:13:21 +0200 |
commit | a28942bdf01f4ddb9d0b5a0489bd6f4e101dd775 (patch) | |
tree | 1e8b49f048a8bb88787d5cc25bae5f278e05b9a6 /lib/git/async/task.py | |
parent | cac6e06cc9ef2903a15e594186445f3baa989a1a (diff) | |
download | gitpython-a28942bdf01f4ddb9d0b5a0489bd6f4e101dd775.tar.gz |
Added performance test, improved iterator task which will now be usable by default. It shows that there must be the notion of a producer, which can work if there are no items read
Diffstat (limited to 'lib/git/async/task.py')
-rw-r--r-- | lib/git/async/task.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/git/async/task.py b/lib/git/async/task.py index d7f331b7..0eb4527c 100644 --- a/lib/git/async/task.py +++ b/lib/git/async/task.py @@ -196,6 +196,9 @@ class InputIteratorTaskBase(OutputChannelTask): self._read = lambda count: weakself().__read(count) self._empty = False + # defaults to returning our items unchanged + self.fun = lambda item: item + def __read(self, count=0): """Read count items from the iterator, and return them""" # not threadsafe, but worst thing that could happen is that |