0

renders now work with the multiprocessing dispatcher

This commit is contained in:
Aaron Griffith
2012-01-06 21:56:26 -05:00
parent b31c4377ab
commit 1baf506a59
3 changed files with 29 additions and 10 deletions

View File

@@ -48,13 +48,14 @@ class Dispatcher(object):
"""
# TODO use status callback
# setup tilesetlist
self.setup_tilesets(tilesetlist)
# preprocessing
for tileset in tilesetlist:
tileset.do_preprocessing()
# setup tilesetlist
self.setup_tilesets(tilesetlist)
# iterate through all possible phases
num_phases = [tileset.get_num_phases() for tileset in tilesetlist]
for phase in xrange(max(num_phases)):
@@ -350,7 +351,7 @@ class MultiprocessingDispatcher(Dispatcher):
finished_jobs += self._handle_messages()
return finished_jobs
def _handle_messages(self, timeout=1.0):
def _handle_messages(self, timeout=0.01):
# work function: takes results out of the result queue and
# keeps track of how many outstanding jobs remain
finished_jobs = []