def worker(work_queue, result_queue, args): """Takes filename from queue, checks them and displays (emit) result. """ while 1: filename = work_queue.get() filename = filename.strip() if not filename: continue check_result = checkers.check(filename, args) if not check_result: continue errors, warnings, summaries = check_result html = emitters.emit(filename, errors, warnings, summaries) result_queue.put(html)
def worker(work_queue, args): """Takes filename from queue, checks them and displays (emit) result. """ while 1: filename = work_queue.get() filename = filename.strip() if not filename: continue check_result = checkers.check(filename, args) if not check_result: continue errors, warnings, summaries = check_result html = emitters.emit(filename, errors, warnings, summaries) http_server.SHARED_CONDITION.acquire() http_server.SHARED_RESULT = html http_server.SHARED_CONDITION.notifyAll() http_server.SHARED_CONDITION.release()