From f4be63748005a08a288132757ffda2ffb4b6f392 Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Thu, 31 Dec 2015 15:15:33 +0000 Subject: [PATCH] coding style --- vigil | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vigil b/vigil index a4904ae..8ee7b90 100755 --- a/vigil +++ b/vigil @@ -851,26 +851,26 @@ class _Result(Result): pass -def work_loop(child_connection): +def work_loop(parent_connection): while True: - tool, path = child_connection.recv() + tool, path = parent_connection.recv() result = _Result(path, tool) status, result.result = tools.run_tool_no_error(path, tool) - child_connection.send(status) + parent_connection.send(status) class Worker: def __init__(self): - self.parent_connection, child_connection = multiprocessing.Pipe() + self.child_connection, parent_connection = multiprocessing.Pipe() self.process = multiprocessing.Process( - target=work_loop, args=(child_connection,), daemon=True) + target=work_loop, args=(parent_connection,), daemon=True) make_process_nicest(self.process.pid) self.process.start() def run_tool(self, path, tool): - self.parent_connection.send([tool, path]) - return self.parent_connection.recv() + self.child_connection.send([tool, path]) + return self.child_connection.recv() def stop(self): os.kill(self.process.pid, signal.SIGKILL)