Easy demo,but thread started, then loop in(self.started )

import gradio as gr

def greet(name):
return "Hello " + name + “!”

demo = gr.Interface(fn=greet, inputs=“text”, outputs=“text”)

if name == “main”:
demo.launch()

class Server(uvicorn.Server):
def install_signal_handlers(self):
pass

def run_in_thread(self):
    self.thread = threading.Thread(target=self.run, daemon=True)
    self.thread.start()
    while not self.started:
        *time.sleep(1e-3)*

def close(self):
    self.should_exit = True
    self.thread.join()

tracing it find loop sleep ?

stack run_in_thread, networking.py:39
start_server, networking.py:163
launch, blocks.py:1703
, app.py:11