diff --git a/python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/_worker_runtime.py b/python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/_worker_runtime.py index a4afb647641f..7e5e9e734dd0 100644 --- a/python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/_worker_runtime.py +++ b/python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/_worker_runtime.py @@ -3,6 +3,7 @@ import json import logging import signal +import sys import uuid import warnings from asyncio import Future, Task @@ -309,6 +310,10 @@ async def stop_when_shutdown(self) -> None: async def stop_when_signal(self, signals: Sequence[signal.Signals] = (signal.SIGTERM, signal.SIGINT)) -> None: """Stop the runtime when a signal is received.""" + + # check if it's running on linux or windows + if sys.platform == "win32": + raise NotImplementedError("Signal handling is not supported on Windows. Please use stop_when_shutdown instead.") loop = asyncio.get_running_loop() shutdown_event = asyncio.Event()