environment/share/doc/ipython/examples/parallel/interengine/interengine.py
def broadcast(client, sender, msg_name, dest_name=None, block=None):
    """broadcast a message from one engine to all others."""
    dest_name = msg_name if dest_name is None else dest_name
    client[sender].execute('com.publish(%s)'%msg_name, block=None)
    targets = client.ids
    targets.remove(sender)
    return client[targets].execute('%s=com.consume()'%dest_name, block=None)
def broadcast(client, sender, msg_name, dest_name=None, block=None):
    """broadcast a message from one engine to all others."""
    dest_name = msg_name if dest_name is None else dest_name
    client[sender].execute('com.publish(%s)'%msg_name, block=None)
    targets = client.ids
    targets.remove(sender)
    return client[targets].execute('%s=com.consume()'%dest_name, block=None)
def broadcast ( client , sender , msg_name , dest_name = None , block = None ) : dest_name = msg_name if dest_name is None else dest_name client [ sender ] . execute ( 'com.publish(%s)' % msg_name , block = None ) targets = client . ids targets . remove ( sender ) return client [ targets ] . execute ( '%s=com.consume()' % dest_name , block = None )
broadcast a message from one engine to all others.
broadcast a message from one engine to all others .