run in thread

def run_in_thread(runnable, is_daemon=True):
    server_thread = Thread(target=runnable)
    server_thread.setDaemon(is_daemon)
    server_thread.start()
    
    return server_thread

猜你喜欢

转载自www.cnblogs.com/wenlin-gk/p/10760668.html