def METHOD_NAME(self, bus: BusABC) -> None:
    # determine message handling callable early, not inside while loop
    handle_message = cast(
        Callable[[Message], None],
        self._on_message_received
        if self._loop is None
        else functools.partial(
            self._loop.call_soon_threadsafe, self._on_message_received
        ),
    )
    while self._running:
        try:
            if msg := bus.recv(self.timeout):
                with self._lock:
                    handle_message(msg)
        except Exception as exc:  # pylint: disable=broad-except
            self.exception = exc
            if self._loop is not None:
                self._loop.call_soon_threadsafe(self._on_error, exc)
                # Raise anyway
                raise
            elif not self._on_error(exc):
                # If it was not handled, raise the exception here
                raise
            else:
                # It was handled, so only log it
                logger.debug("suppressed exception: %s", exc)