Merged revisions 65864 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r65864 | jesse.noller | 2008-08-19 14:06:19 -0500 (Tue, 19 Aug 2008) | 2 lines

  issue3352: clean up the multiprocessing API to remove many get_/set_ methods and convert them to properties. Update the docs and the examples included.
........
This commit is contained in:
Benjamin Peterson 2008-08-19 19:17:39 +00:00
parent be2c2b2313
commit 58ea9fedc8
15 changed files with 86 additions and 92 deletions

View file

@ -450,7 +450,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()
@ -495,7 +495,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
@ -696,7 +696,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()
@ -705,7 +705,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)
@ -886,7 +886,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,