摘要:
生产者消费者模型 import time,random from multiprocessing import Process,Queue def producer(name,food,q): for i in range(3): res='%s%s' %(food,i) time.sleep(ra 阅读全文
posted @ 2019-07-22 14:53
zhouhao666
阅读(261)
评论(0)
推荐(0)
摘要:
from threading import Thread import time def task(name): print('%s is running' %name) time.sleep(2) print('%s is done' %name) if __name__ == '__main__ 阅读全文
posted @ 2019-07-22 10:31
zhouhao666
阅读(91)
评论(0)
推荐(0)
摘要:
from threading import Thread import time def task(name): print('%s is running' %name) time.sleep(2) print('%s is done' %name) if __name__ == '__main__ 阅读全文
posted @ 2019-07-22 09:47
zhouhao666
阅读(149)
评论(0)
推荐(0)
摘要:
from threading import Thread,Lock import time n=100 def task(): global n temp=n time.sleep(0.1) n=temp-1 if __name__ == '__main__': t_l=[] for i in ra 阅读全文
posted @ 2019-07-22 09:21
zhouhao666
阅读(84)
评论(0)
推荐(0)

浙公网安备 33010602011771号