thrope - 2012-11-12

I can't seem to attach a file now but this patch at least gets things working for me:

--- slash/bin/PyF95++ 2012-11-12 13:07:50.000000000 +0000
+++ code/BlockIt/PyF95++/PyF95++ 2011-09-24 04:25:20.000000000 +0100
@@ -444,14 +444,11 @@

fileQueue = multi.Queue()
blkQueue = multi.Queue()
- fqSize = 0
for x in addonSources:
fileQueue.put( x )
- fqSize = fqSize + 1

for x in allSources:
fileQueue.put( x )
- fqSize = fqSize + 1

#..............................................................................
# NOTE: Stop messages for each subprocess since it appears that
@@ -459,7 +456,6 @@
#..............................................................................
for x in xrange( nthreads ):
fileQueue.put( 'STOP' )
- fqSize = fqSize + 1

allSources = []
blksParsed = []
@@ -467,7 +463,7 @@
#........................................
# Launch the threads
#........................................
- for i in xrange( min( nthreads, fqSize ) ):
+ for i in xrange( min( nthreads, fileQueue.qsize() ) ):
p = multi.Process( target=multiParser, args=( i,
blockList,
fileQueue,
@@ -478,7 +474,7 @@

parse_crashed = False
alive = lambda p: p.is_alive()
- while (not blkQueue.empty()) or any( map( alive, processes ) ):
+ while blkQueue.qsize() > 0 or any( map( alive, processes ) ):
try:
blk = blkQueue.get(timeout=0.1)
except: