summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing/managers.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-08-18 18:09:21 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-08-18 18:09:21 (GMT)
commit727537077043bb03a0c9e537cacbb9e695f7f4a8 (patch)
tree7f6062facaa5dda6a57383ffe1a7d7cd6a91f703 /Lib/multiprocessing/managers.py
parentc16a7f3684290ddda130811912ae08a098df3d74 (diff)
downloadcpython-727537077043bb03a0c9e537cacbb9e695f7f4a8.zip
cpython-727537077043bb03a0c9e537cacbb9e695f7f4a8.tar.gz
cpython-727537077043bb03a0c9e537cacbb9e695f7f4a8.tar.bz2
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 ........
Diffstat (limited to 'Lib/multiprocessing/managers.py')
-rw-r--r--Lib/multiprocessing/managers.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py
index a460edc..1fc7d6a 100644
--- a/Lib/multiprocessing/managers.py
+++ b/Lib/multiprocessing/managers.py
@@ -207,7 +207,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
@@ -257,7 +257,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:
@@ -270,7 +270,7 @@ class Server(object):
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 @@ 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)
@@ -706,8 +706,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
@@ -720,7 +720,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
@@ -781,7 +781,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