Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheck.py

branch
maintenance
changeset 6206
a02b03b7bfec
parent 6188
5a6ae3be31e6
child 6235
0e6a395ecfe8
equal deleted inserted replaced
6205:ad8ed15f90e5 6206:a02b03b7bfec
161 initialTasks = 2 * NumberOfProcesses 161 initialTasks = 2 * NumberOfProcesses
162 for task in argumentsList[:initialTasks]: 162 for task in argumentsList[:initialTasks]:
163 taskQueue.put(task) 163 taskQueue.put(task)
164 164
165 # Start worker processes 165 # Start worker processes
166 for i in range(NumberOfProcesses): 166 for _ in range(NumberOfProcesses):
167 multiprocessing.Process(target=worker, args=(taskQueue, doneQueue))\ 167 multiprocessing.Process(target=worker, args=(taskQueue, doneQueue))\
168 .start() 168 .start()
169 169
170 # Get and send results 170 # Get and send results
171 endIndex = len(argumentsList) - initialTasks 171 endIndex = len(argumentsList) - initialTasks
191 191
192 if i < endIndex: 192 if i < endIndex:
193 taskQueue.put(argumentsList[i + initialTasks]) 193 taskQueue.put(argumentsList[i + initialTasks])
194 194
195 # Tell child processes to stop 195 # Tell child processes to stop
196 for i in range(NumberOfProcesses): 196 for _ in range(NumberOfProcesses):
197 taskQueue.put('STOP') 197 taskQueue.put('STOP')
198 198
199 199
200 def worker(inputQueue, outputQueue): 200 def worker(inputQueue, outputQueue):
201 """ 201 """

eric ide

mercurial