From 71afafe808f0be36740719a23f73457ced9ebb32 Mon Sep 17 00:00:00 2001 From: Frost Ming Date: Tue, 7 Jan 2025 15:44:07 +0800 Subject: [PATCH] fix: set the arbiter thread to be daemon thread Signed-off-by: Frost Ming --- src/bentoml/_internal/utils/circus/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bentoml/_internal/utils/circus/__init__.py b/src/bentoml/_internal/utils/circus/__init__.py index 4309f3f28dd..cd3a0bd2306 100644 --- a/src/bentoml/_internal/utils/circus/__init__.py +++ b/src/bentoml/_internal/utils/circus/__init__.py @@ -36,7 +36,7 @@ def stop(self) -> None: class ThreadedArbiter(Arbiter, Thread): def __init__(self, *args: t.Any, **kwargs: t.Any) -> None: Arbiter.__init__(self, *args, **kwargs) - Thread.__init__(self) + Thread.__init__(self, daemon=True) self.__cb: t.Optional[t.Callable[[t.Any], t.Any]] = None def start(self, cb: t.Callable[[t.Any], t.Any] | None = None) -> None: