1.1 --- a/examples/PyGmy/ppygmy.py Sun Nov 19 00:10:06 2006 +0000
1.2 +++ b/examples/PyGmy/ppygmy.py Sun Nov 19 00:10:24 2006 +0000
1.3 @@ -372,15 +372,15 @@
1.4
1.5 exchange = pprocess.Exchange()
1.6 y = 0
1.7 + nproc = len(exchange.active())
1.8 +
1.9 while y < self.height or nproc > 0:
1.10 - if nproc < limit:
1.11 + if y < self.height and nproc < limit:
1.12 channel = pprocess.start(self.render_row, y)
1.13 exchange.add(channel)
1.14 y += 1
1.15 - nproc += 1
1.16
1.17 for channel in exchange.ready():
1.18 - nproc -= 1
1.19 sy, row = channel.receive()
1.20 sx = 0
1.21 for col in row:
1.22 @@ -393,6 +393,8 @@
1.23 percentstr = str(int((count/float(total))*100))+"%"
1.24 print "\b\b\b"+percentstr
1.25
1.26 + nproc = len(exchange.active())
1.27 +
1.28 image.save(filename)
1.29
1.30 # vim: tabstop=4 expandtab shiftwidth=4