- increased the number of workers in FlatCAM and made the number of workers customizable from Preferences

This commit is contained in:
Marius Stanciu
2019-04-05 16:27:55 +03:00
committed by Marius
parent cefb74d792
commit b7fce74ca3
5 changed files with 46 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ class WorkerStack(QtCore.QObject):
worker_task = QtCore.pyqtSignal(dict) # 'worker_name', 'func', 'params'
thread_exception = QtCore.pyqtSignal(object)
def __init__(self):
def __init__(self, workers_number):
super(WorkerStack, self).__init__()
self.workers = []
@@ -16,7 +16,7 @@ class WorkerStack(QtCore.QObject):
self.load = {} # {'worker_name': tasks_count}
# Create workers crew
for i in range(0, 2):
for i in range(0, workers_number):
worker = Worker(self, 'Slogger-' + str(i))
thread = QtCore.QThread()