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()
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()