标签:监测 pre gevent div join() col none key code
from gevent import monkey;monkey.patch_all() import gevent import time def eat(name): print(‘%s eat 1‘ % name) time.sleep(3) print(‘%s eat 2‘ % name) def play(name): print(‘%s play 1‘ % name) time.sleep(4) print(‘%s play 2‘ % name) g1=gevent.spawn(eat,‘egon‘) g2=gevent.spawn(play,‘alex‘) # time.sleep(5) # g1.join() # g2.join() gevent.joinall([g1,g2])
标签:监测 pre gevent div join() col none key code
原文地址:https://www.cnblogs.com/yelublue/p/9125047.html