示例#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())