MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / run

Method run

example_code/item_070.py:98–112  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

96
97 print("Example 6")
98 def run(self):
99 while True:
100 self.polled_count += 1
101 try:
102 item = self.in_queue.get()
103 except IndexError:
104 time.sleep(0.01) # No work to do
105 except AttributeError:
106 # The magic exit signal to make this easy to show in
107 # example code, but don't use this in practice.
108 return
109 else:
110 result = self.func(item)
111 self.out_queue.put(result)
112 self.work_done += 1
113
114
115print("Example 7")

Callers 10

item_109.pyFile · 0.45
item_067.pyFile · 0.45
item_077.pyFile · 0.45
item_076.pyFile · 0.45
item_095.pyFile · 0.45
item_113.pyFile · 0.45
item_075.pyFile · 0.45
top_n.pyFile · 0.45
with_trace.pyFile · 0.45
using_gc.pyFile · 0.45

Calls 2

putMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected