1、开启后台线程
设置daemon为True开启后台线程。后台线程会在主线程终止时自动销毁
import threading t = threading.Thread(target=subthread, daemon=True) t.start()
Copyright @ 2024 ericyuan Powered by .NET 8.0 on Kubernetes Powered by: .Text and ASP.NET Theme by: .NET Monster