summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing/managers.py
diff options
context:
space:
mode:
authorJesse Noller <jnoller@gmail.com>2008-08-19 19:06:19 (GMT)
committerJesse Noller <jnoller@gmail.com>2008-08-19 19:06:19 (GMT)
commit5bc9f4c09c99eb701dbee83fb9e26eed558e474f (patch)
tree8eea24fb14c899f2d51d3206fa4a9b032159220a /Lib/multiprocessing/managers.py
parent7c972f971ce46fb2a0c6e0b49265b8d4ef2a0773 (diff)
downloadcpython-5bc9f4c09c99eb701dbee83fb9e26eed558e474f.zip
cpython-5bc9f4c09c99eb701dbee83fb9e26eed558e474f.tar.gz
cpython-5bc9f4c09c99eb701dbee83fb9e26eed558e474f.tar.bz2
issue3352: clean up the multiprocessing API to remove many get_/set_ methods and convert them to properties. Update the docs and the examples included.
Diffstat (limited to 'Lib/multiprocessing/managers.py')
-rw-r--r--Lib/multiprocessing/managers.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py
index 6f0cc7d..256e572 100644
--- a/Lib/multiprocessing/managers.py
+++ b/Lib/multiprocessing/managers.py
@@ -444,7 +444,7 @@ class BaseManager(object):
def __init__(self, address=None, authkey=None, serializer='pickle'):
if authkey is None:
- authkey = current_process().get_authkey()
+ authkey = current_process().authkey
self._address = address # XXX not final address if eg ('', 0)
self._authkey = AuthenticationString(authkey)
self._state = State()
@@ -489,7 +489,7 @@ class BaseManager(object):
self._serializer, writer),
)
ident = ':'.join(str(i) for i in self._process._identity)
- self._process.set_name(type(self).__name__ + '-' + ident)
+ self._process.name = type(self).__name__ + '-' + ident
self._process.start()
# get address of server
@@ -690,7 +690,7 @@ class BaseProxy(object):
elif self._manager is not None:
self._authkey = self._manager._authkey
else:
- self._authkey = current_process().get_authkey()
+ self._authkey = current_process().authkey
if incref:
self._incref()
@@ -699,7 +699,7 @@ class BaseProxy(object):
def _connect(self):
util.debug('making connection to manager')
- name = current_process().get_name()
+ name = current_process().name
if threading.current_thread().name != 'MainThread':
name += '|' + threading.current_thread().name
conn = self._Client(self._token.address, authkey=self._authkey)
@@ -880,7 +880,7 @@ def AutoProxy(token, serializer, manager=None, authkey=None,
if authkey is None and manager is not None:
authkey = manager._authkey
if authkey is None:
- authkey = current_process().get_authkey()
+ authkey = current_process().authkey
ProxyType = MakeProxyType('AutoProxy[%s]' % token.typeid, exposed)
proxy = ProxyType(token, serializer, manager=manager, authkey=authkey,