Mercurial > cpython-lru_cache-weakref
diff Lib/multiprocessing/managers.py @ 48747:1fdfa382ae13
Merged revisions 65824 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r65824 | benjamin.peterson | 2008-08-18 13:01:43 -0500 (Mon, 18 Aug 2008) | 1 line
change a few uses of the threading APIs
........
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Mon, 18 Aug 2008 18:09:21 +0000 |
| parents | d1e864a5c60c |
| children | 6dda01643106 |
line wrap: on
line diff
--- a/Lib/multiprocessing/managers.py Mon Aug 18 17:52:22 2008 +0000 +++ b/Lib/multiprocessing/managers.py Mon Aug 18 18:09:21 2008 +0000 @@ -207,7 +207,7 @@ Handle requests from the proxies in a particular process/thread ''' util.debug('starting server thread to service %r', - threading.current_thread().get_name()) + threading.current_thread().name) recv = conn.recv send = conn.send @@ -257,7 +257,7 @@ except EOFError: util.debug('got EOF -- exiting thread serving %r', - threading.current_thread().get_name()) + threading.current_thread().name) sys.exit(0) except Exception: @@ -270,7 +270,7 @@ send(('#UNSERIALIZABLE', repr(msg))) except Exception as e: util.info('exception in thread serving %r', - threading.current_thread().get_name()) + threading.current_thread().name) util.info(' ... message was %r', msg) util.info(' ... exception was %r', e) conn.close() @@ -392,7 +392,7 @@ ''' Spawn a new thread to serve this connection ''' - threading.current_thread().set_name(name) + threading.current_thread().name = name c.send(('#RETURN', None)) self.serve_client(c) @@ -706,8 +706,8 @@ def _connect(self): util.debug('making connection to manager') name = current_process().get_name() - if threading.current_thread().get_name() != 'MainThread': - name += '|' + threading.current_thread().get_name() + if threading.current_thread().name != 'MainThread': + name += '|' + threading.current_thread().name conn = self._Client(self._token.address, authkey=self._authkey) dispatch(conn, None, 'accept_connection', (name,)) self._tls.connection = conn @@ -720,7 +720,7 @@ conn = self._tls.connection except AttributeError: util.debug('thread %r does not own a connection', - threading.current_thread().get_name()) + threading.current_thread().name) self._connect() conn = self._tls.connection @@ -781,7 +781,7 @@ # the process owns no more references to objects for this manager if not idset and hasattr(tls, 'connection'): util.debug('thread %r has no more proxies so closing conn', - threading.current_thread().get_name()) + threading.current_thread().name) tls.connection.close() del tls.connection
