Пример #1
0
    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)
Пример #2
0
    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 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
Пример #4
0
    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
Пример #5
0
 def free(self) -> None:
     hal.stopNotifier(self._notifier)
     hal.cleanNotifier(self._notifier)
Пример #6
0
 def free(self) -> None:
     hal.stopNotifier(self._notifier)
     hal.cleanNotifier(self._notifier)
     self._loop.stop()
     self._loop.close()
Пример #7
0
 def free(self):  # called by python
     hal.stopNotifier(self._notifier)
     hal.cleanNotifier(self._notifier)