From a28942bdf01f4ddb9d0b5a0489bd6f4e101dd775 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Fri, 11 Jun 2010 20:13:21 +0200 Subject: 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 --- lib/git/async/task.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/git/async/task.py') 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 -- cgit v1.2.1