@staticmethod
def run():
    'Dispatches an event to the highest priority Ahsm\n        until all event queues are empty (i.e. Run To Completion).\n        '
    getPriority = (lambda x: x.priority)
    while True:
        allQueuesEmpty = True
        sorted_acts = sorted(Framework._ahsm_registry, key=getPriority)
        for act in sorted_acts:
            if act.has_msgs():
                event_next = act.pop_msg()
                act.dispatch(act, event_next)
                allQueuesEmpty = False
                break
        if allQueuesEmpty:
            return
Dispatches an event to the highest priority Ahsm
until all event queues are empty (i.e. Run To Completion).
@staticmethod
def run():
    'Dispatches an event to the highest priority Ahsm\n        until all event queues are empty (i.e. Run To Completion).\n        '
    getPriority = (lambda x: x.priority)
    while True:
        allQueuesEmpty = True
        sorted_acts = sorted(Framework._ahsm_registry, key=getPriority)
        for act in sorted_acts:
            if act.has_msgs():
                event_next = act.pop_msg()
                act.dispatch(act, event_next)
                allQueuesEmpty = False
                break
        if allQueuesEmpty:
            return