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

Function printer

recipes/Python/475217_Bounded_Buffer_Example_2/recipe-475217.py:87–92  ·  view source on GitHub ↗
(run_flag, consumer_thread, print_queue)

Source from the content-addressed store, hash-verified

85 print_queue.put('Consumer: %s Widget' % id(widget))
86
87def printer(run_flag, consumer_thread, print_queue):
88 while run_flag[0] or consumer_thread.isAlive() or not print_queue.empty():
89 if print_queue.empty():
90 sleep(0.1)
91 else:
92 print print_queue.get()
93
94################################################################################
95

Callers

nothing calls this directly

Calls 3

sleepFunction · 0.85
emptyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected