python——gevent

import gevent
from gevent import monkey
import time
monkey.patch_all()
def func1():
print("111111")
time.sleep(1)

def func2():
print("2222")
time.sleep(1)

def func3():
print("3333")
time.sleep(1)

g1=gevent.spawn(func1)
g2=gevent.spawn(func2)
g3=gevent.spawn(func3)
g1.join()
g3.join()
g2.join()
print("我结束了")

上一篇:将less-loader降级后,报错serve with message‘spawn vue-cli-service ENOENT‘


下一篇:gevent