164 # Tell child processes to stop |
164 # Tell child processes to stop |
165 for i in range(NumberOfProcesses): |
165 for i in range(NumberOfProcesses): |
166 taskQueue.put('STOP') |
166 taskQueue.put('STOP') |
167 |
167 |
168 |
168 |
169 def worker(input, output): |
169 def worker(inputQueue, outputQueue): |
170 """ |
170 """ |
171 Module function acting as the parallel worker for the style check. |
171 Module function acting as the parallel worker for the style check. |
172 |
172 |
173 @param input input queue (multiprocessing.Queue) |
173 @param inputQueue input queue (multiprocessing.Queue) |
174 @param output output queue (multiprocessing.Queue) |
174 @param outputQueue output queue (multiprocessing.Queue) |
175 """ |
175 """ |
176 for filename, source, args in iter(input.get, 'STOP'): |
176 for filename, source, args in iter(inputQueue.get, 'STOP'): |
177 result = __checkCodeStyle(filename, source, args) |
177 result = __checkCodeStyle(filename, source, args) |
178 output.put((filename, result)) |
178 outputQueue.put((filename, result)) |
179 |
179 |
180 |
180 |
181 def __checkCodeStyle(filename, source, args): |
181 def __checkCodeStyle(filename, source, args): |
182 """ |
182 """ |
183 Private module function to perform the code style check and/or fix |
183 Private module function to perform the code style check and/or fix |