0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-27 14:13:55 +01:00

internal change

This commit is contained in:
2025-09-01 13:32:00 +02:00
parent 8c802abf1e
commit e1938f2fce

View File

@@ -84,11 +84,11 @@ class ProcessManager:
if process.process.poll() is not None:
self.processes.remove(process)
return bool(self.processes)
def stop_all(self):
def stop_all(self, timeout: float | None = 2):
with self.lock:
for process in self.processes:
process.process.terminate()
process.process.wait(2)
process.process.wait(timeout)
self.processes.remove(process)
def wait_all(self, timeout: float | None = None):
with self.lock: