0

Pool warmup (to report worker IDs) set to aynsc when not in verbose mode

This commit is contained in:
Xon
2011-03-28 16:51:13 +08:00
parent bb07e07f26
commit ff7e9d0794

View File

@@ -129,7 +129,10 @@ class RenderNode(object):
else: else:
pool = multiprocessing.Pool(processes=procs,initializer=pool_initializer,initargs=(self,)) pool = multiprocessing.Pool(processes=procs,initializer=pool_initializer,initargs=(self,))
#warm up the pool so it reports all the worker id's #warm up the pool so it reports all the worker id's
pool.map(bool,xrange(multiprocessing.cpu_count()),1) if logging.getLogger().level >= 10:
pool.map_(bool,xrange(multiprocessing.cpu_count()),1)
else:
pool.map_async(bool,xrange(multiprocessing.cpu_count()),1)
quadtrees = self.quadtrees quadtrees = self.quadtrees