您好我正在尝试调用当前正在运行的 self.x.run()。此代码已安排,无法更改订购
class SocketWatcher(Thread):
   .....
   def checker(self):
      # here I want to call the currently running self.x.run() that has been
      # created in the mainPlayer class..
class counterTicket(Thread):
   ....
   def increment(self):
class mainPlayer:
   ....
   def run(self, obj):
     self.x = counterTicket()
     self.x.increment()
可能吗?
我只想调用一个已在 mainPlayer 类中调用的运行方法。但我不知道该怎么做。如果我要实例化 counterTicket 类以在 SocketWatcher 类中调用 increment(),它似乎会创建新的 counterTicket 类,而不是 mainPlayer 类当前正在运行的 counterTicket 类