예제 #1
0
파일: zeiss.py 프로젝트: Mahmood-B/odemis
 def _createFuture(self):
     """
     Return (CancellableFuture): a future that can be used to manage a move
     """
     f = CancellableFuture()
     f._moving_lock = threading.Lock()  # taken while moving
     f._must_stop = threading.Event()  # cancel of the current future requested
     f._was_stopped = False  # if cancel was successful
     f.task_canceller = self._cancelCurrentMove
     return f
예제 #2
0
파일: nfpm.py 프로젝트: ktsitsikas/odemis
 def _createFuture(self):
     """
     Return (CancellableFuture): a future that can be used to manage a move
     """
     f = CancellableFuture()
     f._moving_lock = threading.Lock() # taken while moving
     f._must_stop = threading.Event() # cancel of the current future requested
     f._was_stopped = False # if cancel was successful
     f.task_canceller = self._cancelCurrentMove
     return f
예제 #3
0
 def _createMoveFuture(self, ref=False):
     """
     ref: if true, will use a different canceller
     Return (CancellableFuture): a future that can be used to manage a move
     """
     f = CancellableFuture()
     f._moving_lock = threading.Lock()  # taken while moving
     f._must_stop = threading.Event(
     )  # cancel of the current future requested
     f._was_stopped = False  # if cancel was successful
     if not ref:
         f.task_canceller = self._cancelCurrentMove
     else:
         f.task_canceller = self._cancelReference
     return f