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):
from multiprocessing.pool import Pool
if not DEBUG:
if not DEBUG and self.nProcesses > 0:
if isinstance(self.pool, Pool):
self.pool.terminate()
self.pool = None
......@@ -457,7 +457,7 @@ class PixelLoader(QObject):
args = (workPackage, self.resultQueue, self.cancelEvent)
kwds = {}
if DEBUG:
if DEBUG or self.nProcesses < 1:
self.checkQueue(loadProfiles(*args, **kwds))
else:
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