2020年5月14日

摘要: 条件 from threading import Condition,Thread 一个条件被创建之初,默认有一个False状态 False状态会影响wait 一直处于等待状态 notify制造钥匙(int数据类型) def func(con,n): for i in range(10): con. 阅读全文
posted @ 2020-05-14 22:16 bingzhang 阅读(141) 评论(0) 推荐(0)
摘要: 守护进程 守护线程 import time from threading import Thread def func1(): while True: print(666) time.sleep(10) def func2(): print('in func2') time.sleep(5) t = 阅读全文
posted @ 2020-05-14 22:15 bingzhang 阅读(126) 评论(0) 推荐(0)

导航