MCPcopy Index your code
hub / github.com/RustPython/RustPython / AutoProxy

Function AutoProxy

Lib/multiprocessing/managers.py:986–1009  ·  view source on GitHub ↗

Return an auto-proxy for `token`

(token, serializer, manager=None, authkey=None,
              exposed=None, incref=True, manager_owned=False)

Source from the content-addressed store, hash-verified

984
985
986def AutoProxy(token, serializer, manager=None, authkey=None,
987 exposed=None, incref=True, manager_owned=False):
988 '''
989 Return an auto-proxy for `token`
990 '''
991 _Client = listener_client[serializer][1]
992
993 if exposed is None:
994 conn = _Client(token.address, authkey=authkey)
995 try:
996 exposed = dispatch(conn, None, 'get_methods', (token,))
997 finally:
998 conn.close()
999
1000 if authkey is None and manager is not None:
1001 authkey = manager._authkey
1002 if authkey is None:
1003 authkey = process.current_process().authkey
1004
1005 ProxyType = MakeProxyType('AutoProxy[%s]' % token.typeid, exposed)
1006 proxy = ProxyType(token, serializer, manager=manager, authkey=authkey,
1007 incref=incref, manager_owned=manager_owned)
1008 proxy._isauto = True
1009 return proxy
1010
1011#
1012# Types/callables which we will register with SyncManager

Callers

nothing calls this directly

Calls 3

MakeProxyTypeFunction · 0.85
dispatchFunction · 0.70
closeMethod · 0.45

Tested by

no test coverage detected