158 # Tell child processes to stop |
158 # Tell child processes to stop |
159 for i in range(NumberOfProcesses): |
159 for i in range(NumberOfProcesses): |
160 taskQueue.put('STOP') |
160 taskQueue.put('STOP') |
161 |
161 |
162 |
162 |
163 def worker(input, output): |
163 def worker(inputQueue, outputQueue): |
164 """ |
164 """ |
165 Module function acting as the parallel worker for the style check. |
165 Module function acting as the parallel worker for the style check. |
166 |
166 |
167 @param input input queue (multiprocessing.Queue) |
167 @param inputQueue input queue (multiprocessing.Queue) |
168 @param output output queue (multiprocessing.Queue) |
168 @param outputQueue output queue (multiprocessing.Queue) |
169 """ |
169 """ |
170 for filename, args in iter(input.get, 'STOP'): |
170 for filename, args in iter(inputQueue.get, 'STOP'): |
171 source, checkFlakes, ignoreStarImportWarnings = args |
171 source, checkFlakes, ignoreStarImportWarnings = args |
172 result = __syntaxAndPyflakesCheck(filename, source, checkFlakes, |
172 result = __syntaxAndPyflakesCheck(filename, source, checkFlakes, |
173 ignoreStarImportWarnings) |
173 ignoreStarImportWarnings) |
174 output.put((filename, result)) |
174 outputQueue.put((filename, result)) |
175 |
175 |
176 |
176 |
177 def __syntaxAndPyflakesCheck(filename, codestring, checkFlakes=True, |
177 def __syntaxAndPyflakesCheck(filename, codestring, checkFlakes=True, |
178 ignoreStarImportWarnings=False): |
178 ignoreStarImportWarnings=False): |
179 """ |
179 """ |