thread_num =len(threading.enumerate())print("当前线程的数量为:" +str(thread_num))print('线程详情:')print(threading.enumerate())if thread_num <= 1:#当剩下一个线程的情况下(也就是只剩下主线程的情况下,退出) breaktime.sleep(0.5)if __name__ == '__main__': main() View Code 1. 2...