Ticket #3948: issue_3948.patch

File issue_3948.patch, 1.2 KB (added by psykidellic, 4 years ago)
  • twisted/internet/wxreactor.py

     
    7272        """ 
    7373        self.wxapp = wxapp 
    7474 
     75 
    7576    def _installSignalHandlersAgain(self): 
    7677        """ 
    7778        wx sometimes removes our own signal handlers, so re-add them. 
     
    8485            return 
    8586        self._handleSignals() 
    8687 
     88 
    8789    def stop(self): 
    8890        """ 
    8991        Stop the reactor. 
     
    9193        if self._stopping: 
    9294            return 
    9395        self._stopping = True 
    94         _threadedselect.ThreadedSelectReactor.stop(self) 
     96        self.callFromThread(_threadedselect.ThreadedSelectReactor.stop, self) 
    9597 
     98 
    9699    def _runInMainThread(self, f): 
    97100        """ 
    98101        Schedule function to run in main wx/Twisted thread. 
     
    105108            # wx shutdown but twisted hasn't 
    106109            self._postQueue.put(f) 
    107110 
     111 
    108112    def _stopWx(self): 
    109113        """ 
    110114        Stop the wx event loop if it hasn't already been stopped. 
     
    114118        if hasattr(self, "wxapp"): 
    115119            self.wxapp.ExitMainLoop() 
    116120 
     121 
    117122    def run(self, installSignalHandlers=True): 
    118123        """ 
    119124        Start the reactor.