[Frontend][Core] Add shutdown timeout - allowing in-flight requests to finish (#34730)

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Mark McLoughlin
2026-03-05 22:04:31 -08:00
committed by GitHub
co-authored by Claude Sonnet 4.5
parent 57c84ff129
commit 27066d1b2b
15 changed files with 762 additions and 90 deletions
+2 -3
View File
@@ -264,16 +264,15 @@ class AsyncLLM(EngineClient):
def __del__(self):
self.shutdown()
def shutdown(self):
def shutdown(self, timeout: float | None = None) -> None:
"""Shutdown, cleaning up the background proc and IPC."""
shutdown_prometheus()
if renderer := getattr(self, "renderer", None):
renderer.shutdown()
if engine_core := getattr(self, "engine_core", None):
engine_core.shutdown()
engine_core.shutdown(timeout=timeout)
handler = getattr(self, "output_handler", None)
if handler is not None: