亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Python executes two functions at the same time
歐陽(yáng)克
歐陽(yáng)克 2017-06-22 11:52:20
0
1
1064

I have customized two functions now

def test():

while True:
    ...
    ...

def test1():

while True:
    ...
    ...

These two functions are two functions in an infinite loop. Now I want these two functions to be executed simultaneously in the same PY file. I don’t know if the experts have any good solutions. Newbie asking for advice.

歐陽(yáng)克
歐陽(yáng)克

溫故而知新,可以為師矣。 博客:www.ouyangke.com

reply all(1)
為情所困

Multiple threading

import threading

threading.Thread(target= test).start()
threading.Thread(target=test1).start()
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template