MCPcopy Create free account
hub / github.com/ActiveState/code / shower

Function shower

recipes/Python/327082_Pseudo_threads_generators/recipe-327082.py:161–169  ·  view source on GitHub ↗
(queue)

Source from the content-addressed store, hash-verified

159 yield i
160
161 def shower(queue):
162 # Never stop reading the queue:
163 while True:
164 try:
165 cnt = queue.get()
166 print 'cnt =', cnt
167 except QueueEmpty:
168 pass
169 yield None
170
171 print 'Test 1: (should print range 0..22)'
172 queue = Queue()

Callers 1

recipe-327082.pyFile · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected