1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/create_loop.py Mon Sep 26 18:25:58 2005 +0000
1.3 @@ -0,0 +1,18 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +from parallel import create
1.7 +
1.8 +limit = 100
1.9 +channel = create()
1.10 +if channel.pid == 0:
1.11 + i = channel.receive()
1.12 + while i < limit:
1.13 + print i
1.14 + i = channel.receive()
1.15 + channel.send("Done")
1.16 +else:
1.17 + for i in range(0, limit + 1):
1.18 + channel.send(i)
1.19 + print channel.receive()
1.20 +
1.21 +# vim: tabstop=4 expandtab shiftwidth=4