From 6977ae7d5e8ba06595c993ce4077cc6f0dce906b Mon Sep 17 00:00:00 2001 From: Lianmin Zheng Date: Fri, 6 Dec 2024 01:58:21 -0800 Subject: [PATCH] Use proc.join instead of busy waiting --- python/sglang/srt/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/srt/server.py b/python/sglang/srt/server.py index 7b91cb69797..29bc44eb524 100644 --- a/python/sglang/srt/server.py +++ b/python/sglang/srt/server.py @@ -462,8 +462,8 @@ def launch_engine( if server_args.node_rank >= 1: # For other nodes, they do not need to run tokenizer or detokenizer, # so they can just wait here. - while True: - pass + for proc in scheduler_procs: + proc.join() else: # Launch the data parallel controller reader, writer = mp.Pipe(duplex=False)