119 # Tell child processes to stop |
119 # Tell child processes to stop |
120 for i in range(NumberOfProcesses): |
120 for i in range(NumberOfProcesses): |
121 taskQueue.put('STOP') |
121 taskQueue.put('STOP') |
122 |
122 |
123 |
123 |
124 def worker(input, output): |
124 def worker(inputQueue, outputQueue): |
125 """ |
125 """ |
126 Module function acting as the parallel worker for the style check. |
126 Module function acting as the parallel worker for the style check. |
127 |
127 |
128 @param input input queue (multiprocessing.Queue) |
128 @param inputQueue input queue (multiprocessing.Queue) |
129 @param output output queue (multiprocessing.Queue) |
129 @param outputQueue output queue (multiprocessing.Queue) |
130 """ |
130 """ |
131 for filename, args in iter(input.get, 'STOP'): |
131 for filename, args in iter(inputQueue.get, 'STOP'): |
132 source = args[0] |
132 source = args[0] |
133 result = __jsSyntaxCheck(filename, source) |
133 result = __jsSyntaxCheck(filename, source) |
134 output.put((filename, result)) |
134 outputQueue.put((filename, result)) |
135 |
135 |
136 |
136 |
137 def __jsSyntaxCheck(file, codestring): |
137 def __jsSyntaxCheck(file, codestring): |
138 """ |
138 """ |
139 Function to check a Javascript source file for syntax errors. |
139 Function to check a Javascript source file for syntax errors. |