1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
import threading import time
localtime = time.asctime( time.localtime(time.time()) )
def (single): print("Recently time is %s"%localtime) single.wait()
single = threading.Event()
for x in range(3): t = threading.Thread(target=run,args=(single,)) t.start() time.sleep(1) single.set()
|
近期评论