import time print "--SELFTEST-- loading test" us = [ '127.0.0.1#P1', '127.0.0.1#P2' ] def payload1(): print "--STEPTEST-- payload1 start" b = job.barrier('127.0.0.1#P2', 'here', 45) b.rendezvous(*us) print "--STEPTEST-- payload1 complete" def payload2(): print "--STEPTEST-- payload2 start" time.sleep(5) b = job.barrier('127.0.0.1#P1', 'here', 40) b.rendezvous(*us) time.sleep(1) print "--STEPTEST-- payload2 complete" job.parallel([payload1], [payload2])