Python executes two functions at the same time
欧阳克
欧阳克 2017-06-22 11:52:20
0
1
944

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.

欧阳克
欧阳克

温故而知新,可以为师矣。 博客: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