假设我有一个这样的程序:
import threading
def dosomething():
print "Something"
class thread2(threading.Thread):
def run():
dosomething()
thread2().start()
会dosomething()
从定义它的主线程运行,还是thread2
从它被调用的地方运行?
我将它用于pygame
程序,因为您不能从多个类中调用 pygame 的方法。