MCPcopy Index your code
hub / github.com/geekcomputers/Python / producer

Class producer

thread_signal.py:8–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7
8class producer(threading.Thread):
9 def __init__(self, event):
10 threading.Thread.__init__(self)
11 self.event = event
12
13 def run(self):
14 while self.event.is_set():
15 print("sub thread")
16 sleep(2)
17 else:
18 print("sub thread end")
19 exit()
20
21
22def handler_thread(event):

Callers 1

thread_signal.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected