summaryrefslogtreecommitdiff
path: root/lib/git/async/channel.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-06 23:41:20 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-07 00:05:09 +0200
commit6a252661c3bf4202a4d571f9c41d2afa48d9d75f (patch)
tree6c46c78078d91aa90b93f18b9c32215b4be57ee0 /lib/git/async/channel.py
parent867129e2950458ab75523b920a5e227e3efa8bbc (diff)
downloadgitpython-6a252661c3bf4202a4d571f9c41d2afa48d9d75f.tar.gz
pool: First version which works as expected in async mode. Its just using a single task for now, but next up are dependent tasks
Diffstat (limited to 'lib/git/async/channel.py')
-rw-r--r--lib/git/async/channel.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/git/async/channel.py b/lib/git/async/channel.py
index 0a1db26b..2add9478 100644
--- a/lib/git/async/channel.py
+++ b/lib/git/async/channel.py
@@ -162,7 +162,15 @@ class RChannel(Channel):
try:
if wc.closed:
have_timeout = True
- break
+ # its about the 'in the meanwhile' :) - get everything
+ # we can in non-blocking mode. This will raise
+ try:
+ while True:
+ out.append(queue.get(False))
+ # END until it raises Empty
+ except Empty:
+ break
+ # END finally, out of here
# END don't continue on closed channels
# END abort reading if it was closed ( in the meanwhile )