MCPcopy Create free account
hub / github.com/saltstack/salt / create_thread

Function create_thread

salt/states/saltmod.py:79–88  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

77 errors = len(inputs) * [None]
78
79 def create_thread(index):
80 def run_thread():
81 try:
82 outputs[index] = func(inputs[index])
83 except: # pylint: disable=bare-except
84 errors[index] = sys.exc_info()
85
86 thread = threading.Thread(target=run_thread)
87 thread.start()
88 return thread
89
90 threads = list(map(create_thread, range(len(inputs))))
91 for thread in threads:

Callers

nothing calls this directly

Calls 1

startMethod · 0.45

Tested by

no test coverage detected