# HG changeset patch # User paulb # Date 1175990590 0 # Node ID 77b0b68f9489422e3f4cff09f3ef9c41a13c1104 # Parent 034fff670ad076d71777c3ccf82fd323f7b64081 [project @ 2007-04-08 00:03:10 by paulb] Provided feedback and used smaller parameters. diff -r 034fff670ad0 -r 77b0b68f9489 examples/simple.py --- a/examples/simple.py Thu Jun 19 21:43:34 2008 +0200 +++ b/examples/simple.py Sun Apr 08 00:03:10 2007 +0000 @@ -9,8 +9,9 @@ # Array size and a limit on the number of processes. -N = 100 +N = 10 limit = 10 +delay = 1 def make_array(n): @@ -25,7 +26,7 @@ process, with 'i' and 'j' as operands. """ - time.sleep(1) + time.sleep(delay) ch.send((i, j, i * N + j)) class MyExchange(pprocess.Exchange): @@ -57,6 +58,7 @@ for j in range(0, N): ch = pprocess.start(calculate, i, j) exchange.add_wait(ch) + print i, j print "Finishing..." exchange.finish()