MCPcopy Create free account
hub / github.com/apache/tvm / kill

Method kill

python/tvm/runtime/disco/process_pool.py:74–94  ·  view source on GitHub ↗

Kill the current running process and cleanup. Note ---- The worker can start a new process when send is called again.

(self)

Source from the content-addressed store, hash-verified

72 pass
73
74 def kill(self):
75 """Kill the current running process and cleanup.
76
77 Note
78 ----
79 The worker can start a new process when send is called again.
80 """
81 if self._proc is not None:
82 # kill all child processes recursively
83 try:
84 _kill_child_processes(self._proc.pid)
85 except TypeError:
86 pass
87 try:
88 self._proc.kill()
89 except OSError:
90 pass
91
92 # Join the child process to avoid zombie processes
93 self.join(timeout=1.0)
94 self._proc = None
95
96 def join(self, timeout=None):
97 """Join the current process worker before it terminates.

Callers 5

__del__Method · 0.95
terminateMethod · 0.45
terminateMethod · 0.45
terminateMethod · 0.45
_kill_child_processesFunction · 0.45

Calls 2

joinMethod · 0.95
_kill_child_processesFunction · 0.85

Tested by

no test coverage detected