def publisher2(ref): msg = ['brave', 'new', 'world', ''] for s in msg: send(ref, s)
def publisher1(ref): # an actor sending messages to the consumer msg = ['hello', 'world'] for s in msg: send(ref, s)