File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
ci/L0_backend_vllm/metrics_test Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -75,11 +75,11 @@ run_test() {
7575 fi
7676 fi
7777
78+ set -e
79+
7880 # TODO: Non-graceful shutdown when metrics are enabled.
7981 kill $SERVER_PID
8082 wait $SERVER_PID
81-
82- set -e
8383}
8484
8585RET=0
Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ def _init_engine(self):
228228 # Run the engine in a separate thread running the AsyncIO event loop.
229229 self ._llm_engine = None
230230 self ._llm_engine_start_cv = threading .Condition ()
231- self ._llm_engine_shutdown_event = asyncio .Event ()
231+ self ._llm_engine_shutdown_event = threading .Event ()
232232 self ._event_thread = threading .Thread (
233233 target = asyncio .run , args = (self ._run_llm_engine (),)
234234 )
@@ -268,7 +268,8 @@ async def _run_llm_engine(self):
268268 self ._llm_engine_start_cv .notify_all ()
269269
270270 # Wait for the engine shutdown signal.
271- await self ._llm_engine_shutdown_event .wait ()
271+ while not self ._llm_engine_shutdown_event .is_set ():
272+ await asyncio .sleep (0.1 ) # Prevent busy-waiting
272273
273274 # Wait for the ongoing requests to complete.
274275 while self ._ongoing_request_count > 0 :
You can’t perform that action at this time.
0 commit comments