'Adds a message object to the queue.'

def _send_to_observers(self, m):

    to_remove = set()
    for observer in observers.copy():
        try:
            observer(m)
        except Exception as e:
            msg = 'Observer    function    at    "%s"    failed    with    exception    "%s".    Removing    observer    from    list.'
            om.out.error((msg % (observer, e)))
            to_remove.add(observer)
    for broken_obs in to_remove:
        observers.remove(broken_obs)
