MCPcopy Create free account
hub / github.com/FastLED/FastLED / _cleanup_all_processes

Method _cleanup_all_processes

ci/util/pio_process_killer.py:128–143  ·  view source on GitHub ↗

Kill all tracked PIO processes and their children.

(self)

Source from the content-addressed store, hash-verified

126 logger.debug("Cannot install signal handlers (not in main thread)")
127
128 def _cleanup_all_processes(self) -> None:
129 """Kill all tracked PIO processes and their children."""
130 with self._lock:
131 if not self._processes:
132 return
133
134 logger.info(
135 f"Cleaning up {len(self._processes)} outstanding PIO processes..."
136 )
137 pids_to_cleanup = list(self._processes.keys())
138
139 for pid in pids_to_cleanup:
140 self._kill_process_tree(pid)
141
142 with self._lock:
143 self._processes.clear()
144
145 def _kill_process_tree(self, pid: int) -> int:
146 """Kill a process and all its children.

Callers 2

signal_handlerMethod · 0.95
kill_all_pio_processesFunction · 0.80

Calls 5

_kill_process_treeMethod · 0.95
listClass · 0.85
infoMethod · 0.45
keysMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected