def _serviceActions(self) -> int:
        """
        Run all pending actions in the action queue.

        :return: number of actions executed.
        """
        if self.aqStash:
            tm = time.perf_counter()
            if tm > self.aqNextCheck:
                earliest = float('inf')
                for d in list(self.aqStash):
                    nxt, action = d
                    if tm > nxt:
                        self.actionQueue.appendleft(action)
                        self.aqStash.remove(d)
                    if nxt < earliest:
                        earliest = nxt
                self.aqNextCheck = earliest
        count = len(self.actionQueue)
        while self.actionQueue:
            action, aid = self.actionQueue.popleft()
            assert action in self.scheduled
            if aid in self.scheduled[action]:
                self.scheduled[action].remove(aid)
                logger.trace("{} running action {} with id {}".
                             format(self, get_func_name(action), aid))
                action()
            else:
                logger.trace("{} not running cancelled action {} with id {}".
                             format(self, get_func_name(action), aid))
        return count
Run all pending actions in the action queue.

        :return: number of actions executed.