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.
为情所困2017-06-22 11:54:20
Multiple threading
import threading
threading.Thread(target= test).start()
threading.Thread(target=test1).start()