摘要:
#练习:线程等待 Event e.set() e.wait() from threading import Thread, Lock import threading import time def wait_for_event(e): #Wait for the event to be set b 阅读全文
摘要:
#练习:创建一个线程 from threading import Thread import time def run(a = None, b = None) : print a, b time.sleep(1) t = Thread(target = run, name="wangjing",args = ("this is a", "thread")) #此时线程是新建状态 ... 阅读全文