建议使用import threading它进行了兼容处理
方法一:
def say(world):
print(world)
t = thread.Thread(target=say,args=["nice"])
t.start()
方法二:
class MyThread(threading.Thread):
def run(self):
print("......run....")
t = MyThread()
t.start()
建议使用import threading它进行了兼容处理
方法一:
def say(world):
print(world)
t = thread.Thread(target=say,args=["nice"])
t.start()
方法二:
class MyThread(threading.Thread):
def run(self):
print("......run....")
t = MyThread()
t.start()