Esempio n. 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)
Esempio n. 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
Esempio n. 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
Esempio n. 5
0
 def free(self) -> None:
     hal.stopNotifier(self._notifier)
     hal.cleanNotifier(self._notifier)
Esempio n. 6
0
 def free(self) -> None:
     hal.stopNotifier(self._notifier)
     hal.cleanNotifier(self._notifier)
     self._loop.stop()
     self._loop.close()
Esempio n. 7
0
 def free(self):  # called by python
     hal.stopNotifier(self._notifier)
     hal.cleanNotifier(self._notifier)