def cancelTask(self, taskName): """Cancel a task - this both cancels the callback for the thread handling the task and removes the task from tracking :param taskName: task to cancel :type taskName: str """ threadMgr.cancel_thread(taskName) # and finally stop tracking the task self.removeTask(taskName) self.log.info("task %s has been cancelled", taskName)
def addressCancel(self): """Cancel the asynchronous address search""" threadMgr.cancel_thread(self._addressSearchThreadName) self._addressSearchInProgress = False self._addressSearchStatus = "Searching..." self._addressSignal()
def cancelSearch(self, threadId): """Cancel the given asynchronous search thread""" print("canceling search thread: %s" % threadId) threadMgr.cancel_thread(threadId) if threadId in self._threadsInProgress: del self._threadsInProgress[threadId]
def cancelSearch(self, threadId): """Cancel the given asynchronous search thread""" log.info("canceling search thread: %s", threadId) threadMgr.cancel_thread(threadId) if threadId in self._threadsInProgress: del self._threadsInProgress[threadId]