예제 #1
0
    def sender():

        cur = actor.current()
        act.send('helllo')
        msg = cur.receive()
        output('reply comming')
        output(msg)
예제 #2
0
def test_supervisor():

    def supervisor():

        cur = actor.current()

        output(cur)

        output(cur.receive())
        output(cur.receive())


    def erroractor():

        x = 10 / 0

        
    def normalactor():

        return 'Success'


    er = actor.start_child(erroractor)
    nm = actor.Actor(normalactor, actor.current())

    supervisor()
예제 #3
0
    def supervisor():

        cur = actor.current()

        output(cur)

        output(cur.receive())
        output(cur.receive())
예제 #4
0
    def receiver():

        cur = actor.current()
        cur.receive(replyto)
예제 #5
0
    def receiver():

        act = actor.current()
        act.receive(output)
예제 #6
0
    def func():

        print >> sys.stderr, actor.current()
예제 #7
0
def test_selfmsg():

    cur = actor.current()

    cur.send('self messaging')
    output(cur.receive())
예제 #8
0
    def receiver():

        cur = actor.current()
        # noreceive が呼ばれるとキューの最後に回される
        cur.receive(lambda x:actor.noreceive())
        output(cur.receive())