Skip to content
Snippets Groups Projects
Commit e05db7b4 authored by benjamin.jakimow@geo.hu-berlin.de's avatar benjamin.jakimow@geo.hu-berlin.de
Browse files

PixelLoader nProcess == 0 will lead to linear (non-parallel) loading

parent 62b25aef
No related branches found
No related tags found
No related merge requests found
...@@ -434,7 +434,7 @@ class PixelLoader(QObject): ...@@ -434,7 +434,7 @@ class PixelLoader(QObject):
from multiprocessing.pool import Pool from multiprocessing.pool import Pool
if not DEBUG: if not DEBUG and self.nProcesses > 0:
if isinstance(self.pool, Pool): if isinstance(self.pool, Pool):
self.pool.terminate() self.pool.terminate()
self.pool = None self.pool = None
...@@ -457,7 +457,7 @@ class PixelLoader(QObject): ...@@ -457,7 +457,7 @@ class PixelLoader(QObject):
args = (workPackage, self.resultQueue, self.cancelEvent) args = (workPackage, self.resultQueue, self.cancelEvent)
kwds = {} kwds = {}
if DEBUG: if DEBUG or self.nProcesses < 1:
self.checkQueue(loadProfiles(*args, **kwds)) self.checkQueue(loadProfiles(*args, **kwds))
else: else:
r = self.pool.apply_async(loadProfiles, args=args, callback=self.checkQueue, **kwds) r = self.pool.apply_async(loadProfiles, args=args, callback=self.checkQueue, **kwds)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment