def test1():
while True:
print('------1------')
yield None
def test2():
while True:
print('-------2------')
yield None
t1 = test1()
t2 = test2()
while True:
t1.__next__()
t2.__next__()
python~多任务之协程
猜你喜欢
转载自blog.csdn.net/CorrectForm/article/details/83870391
今日推荐
周排行