projects
/
theonering
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Upgrading to 0.15.14 of telepathy-python
[theonering]
/
src
/
util
/
algorithms.py
diff --git
a/src/util/algorithms.py
b/src/util/algorithms.py
index
040967a
..
7052b98
100644
(file)
--- a/
src/util/algorithms.py
+++ b/
src/util/algorithms.py
@@
-572,6
+572,13
@@
def pushback_itr(itr):
maybePushedBack = yield item
+def itr_available(queue, initiallyBlock = False):
+ if initiallyBlock:
+ yield queue.get()
+ while not queue.empty():
+ yield queue.get_nowait()
+
+
if __name__ == "__main__":
import doctest
print doctest.testmod()