def free(self) -> None: handle, self._notifier = self._notifier, None hal.stopNotifier(handle) # Join the thread to ensure the handler has exited. if self._thread.is_alive(): # python-specific: interrupt not supported self._thread.join() hal.cleanNotifier(handle)
def free(self) -> None: """Clean up the notifier. Do not use this object after this method is called. """ handle = self._notifier if handle is None: return hal.stopNotifier(handle) hal.cleanNotifier(handle) self._notifier = None
def close(self) -> None: handle, self._notifier = self._notifier, None if not handle: return hal.stopNotifier(handle) # Join the thread to ensure the handler has exited. if self._thread.is_alive(): # python-specific: interrupt not supported self._thread.join() hal.cleanNotifier(handle) self._thread = None
def free(self) -> None: hal.stopNotifier(self._notifier) hal.cleanNotifier(self._notifier)
def free(self) -> None: hal.stopNotifier(self._notifier) hal.cleanNotifier(self._notifier) self._loop.stop() self._loop.close()
def free(self): # called by python hal.stopNotifier(self._notifier) hal.cleanNotifier(self._notifier)