1.1 --- a/examples/simple.py Thu Jun 19 21:43:34 2008 +0200
1.2 +++ b/examples/simple.py Sun Apr 08 00:03:10 2007 +0000
1.3 @@ -9,8 +9,9 @@
1.4
1.5 # Array size and a limit on the number of processes.
1.6
1.7 -N = 100
1.8 +N = 10
1.9 limit = 10
1.10 +delay = 1
1.11
1.12 def make_array(n):
1.13
1.14 @@ -25,7 +26,7 @@
1.15 process, with 'i' and 'j' as operands.
1.16 """
1.17
1.18 - time.sleep(1)
1.19 + time.sleep(delay)
1.20 ch.send((i, j, i * N + j))
1.21
1.22 class MyExchange(pprocess.Exchange):
1.23 @@ -57,6 +58,7 @@
1.24 for j in range(0, N):
1.25 ch = pprocess.start(calculate, i, j)
1.26 exchange.add_wait(ch)
1.27 + print i, j
1.28
1.29 print "Finishing..."
1.30 exchange.finish()