在主脚本线程结束时停止Thread
📁 python, 示例
例如,我有这样一段代码:
def loop: while True: print(""text"") sleep(10)thread = threading.Thread(target=loop)如何做到在程序结束后停止这个线程?
📁 python, 示例
例如,我有这样一段代码:
def loop: while True: print(""text"") sleep(10)thread = threading.Thread(target=loop)如何做到在程序结束后停止这个线程?