Patchwork [3,of,4] commandserver: rename _serveworker() to _runworker()

login
register
mail settings
Submitter Yuya Nishihara
Date July 17, 2016, 2:03 p.m.
Message ID <80953463c7d704337c64.1468764181@mimosa>
Download mbox | patch
Permalink /patch/15912/
State Accepted
Headers show

Comments

Yuya Nishihara - July 17, 2016, 2:03 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1468647991 -32400
#      Sat Jul 16 14:46:31 2016 +0900
# Node ID 80953463c7d704337c646e2c730318f438c2098e
# Parent  57f747c19205d4dc0e1f0813860d4c625f400b67
commandserver: rename _serveworker() to _runworker()

"run" sounds more natural as the function does never listen for new connection.

Patch

diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py
--- a/mercurial/commandserver.py
+++ b/mercurial/commandserver.py
@@ -481,7 +481,7 @@  class unixforkingservice(object):
                     conn.close()  # release handle in parent process
             else:
                 try:
-                    self._serveworker(conn)
+                    self._runworker(conn)
                     conn.close()
                     os._exit(0)
                 except:  # never return, hence no re-raises
@@ -511,7 +511,7 @@  class unixforkingservice(object):
             self.ui.debug('worker process exited (pid=%d)\n' % pid)
             self._workerpids.discard(pid)
 
-    def _serveworker(self, conn):
+    def _runworker(self, conn):
         signal.signal(signal.SIGCHLD, self._oldsigchldhandler)
         _initworkerprocess()
         h = self._servicehandler