diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-08-18 18:01:43 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-08-18 18:01:43 (GMT) |
commit | a9b2222de40ed62e6ec1c79f6a89607913f4babd (patch) | |
tree | a0555b78f80a1f5027ee3d198bac6326273be834 /Lib/multiprocessing/managers.py | |
parent | cbae8697599b690effd91be411fe4891ff8b52ad (diff) | |
download | cpython-a9b2222de40ed62e6ec1c79f6a89607913f4babd.zip cpython-a9b2222de40ed62e6ec1c79f6a89607913f4babd.tar.gz cpython-a9b2222de40ed62e6ec1c79f6a89607913f4babd.tar.bz2 |
change a few uses of the threading APIs
Diffstat (limited to 'Lib/multiprocessing/managers.py')
-rw-r--r-- | Lib/multiprocessing/managers.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py index ba5af57..160c1cc 100644 --- a/Lib/multiprocessing/managers.py +++ b/Lib/multiprocessing/managers.py @@ -201,7 +201,7 @@ class Server(object): 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 @@ -251,7 +251,7 @@ class Server(object): except EOFError: util.debug('got EOF -- exiting thread serving %r', - threading.current_thread().get_name()) + threading.current_thread().name) sys.exit(0) except Exception: @@ -264,7 +264,7 @@ class Server(object): send(('#UNSERIALIZABLE', repr(msg))) except Exception, 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() @@ -386,7 +386,7 @@ class Server(object): ''' 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) @@ -700,8 +700,8 @@ class BaseProxy(object): 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 @@ -714,7 +714,7 @@ class BaseProxy(object): 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 @@ -775,7 +775,7 @@ class BaseProxy(object): # 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 |