def abort(self): if self.isRunning() and hasattr(self, 'thread_id'): self.abortbyuser = True try: thread2._async_raise(self.thread_id, KeyboardInterrupt) except ValueError: pass
def abort(self): if self._threadid is None: return try: thread2._async_raise(self._threadid, KeyboardInterrupt) self.wait() except ValueError: pass
def cancel(self): tid = self.threadid if tid is None: return try: thread2._async_raise(tid, KeyboardInterrupt) except ValueError: pass