Exemple #1
0
    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)
Exemple #2
0
 def addressCancel(self):
     """Cancel the asynchronous address search"""
     threadMgr.cancel_thread(self._addressSearchThreadName)
     self._addressSearchInProgress = False
     self._addressSearchStatus = "Searching..."
     self._addressSignal()
Exemple #3
0
 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]
Exemple #4
0
 def addressCancel(self):
     """Cancel the asynchronous address search"""
     threadMgr.cancel_thread(self._addressSearchThreadName)
     self._addressSearchInProgress = False
     self._addressSearchStatus = "Searching..."
     self._addressSignal()
Exemple #5
0
 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]