예제 #1
0
def testme1():
    p = CSP()
    with p.par():
        p.process(printme, 1, 2, 3, 4, 5)
        p.process(printme, 6, 7, 7, 8, 9)
        p.process(printme, 2, 3, 6, 3, 2)
    p.start()
예제 #2
0
def testme1():
    p = CSP()
    with p.par():
        p.process(printme, 1, 2, 3, 4, 5)
        p.process(printme, 6, 7, 7, 8, 9)
        p.process(printme, 2, 3, 6, 3, 2)
    p.start()
예제 #3
0
def testme2():
    p = CSP()
    with p.seq():
        p.process(printme, 1, 2, 3)
        with p.par():
            p.process(printme, 1)
            p.process(printme, 2)
            p.process(printme, 3)
        p.process(printme, 5, 6, 7)
    p.start()
예제 #4
0
def testme2():
    p = CSP()
    with p.seq():
        p.process(printme, 1, 2, 3)
        with p.par():
            p.process(printme, 1)
            p.process(printme, 2)
            p.process(printme, 3)
        p.process(printme, 5, 6, 7)
    p.start()