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

Method _callmethod

Lib/multiprocessing/managers.py:818–849  ·  view source on GitHub ↗

Try to call a method of the referent and return a copy of the result

(self, methodname, args=(), kwds={})

Source from the content-addressed store, hash-verified

816 self._tls.connection = conn
817
818 def _callmethod(self, methodname, args=(), kwds={}):
819 '''
820 Try to call a method of the referent and return a copy of the result
821 '''
822 try:
823 conn = self._tls.connection
824 except AttributeError:
825 util.debug('thread %r does not own a connection',
826 threading.current_thread().name)
827 self._connect()
828 conn = self._tls.connection
829
830 conn.send((self._id, methodname, args, kwds))
831 kind, result = conn.recv()
832
833 if kind == '#RETURN':
834 return result
835 elif kind == '#PROXY':
836 exposed, token = result
837 proxytype = self._manager._registry[token.typeid][-1]
838 token.address = self._token.address
839 proxy = proxytype(
840 token, self._serializer, manager=self._manager,
841 authkey=self._authkey, exposed=exposed
842 )
843 conn = self._Client(token.address, authkey=self._authkey)
844 dispatch(conn, None, 'decref', (token.id,))
845 return proxy
846 try:
847 raise convert_to_error(kind, result)
848 finally:
849 del result # break reference cycle
850
851 def _getvalue(self):
852 '''

Callers 15

_getvalueMethod · 0.95
__str__Method · 0.95
__next__Method · 0.80
commonMethod · 0.80
__next__Method · 0.80
sendMethod · 0.80
throwMethod · 0.80
closeMethod · 0.80
acquireMethod · 0.80
releaseMethod · 0.80
__enter__Method · 0.80
__exit__Method · 0.80

Calls 6

_connectMethod · 0.95
convert_to_errorFunction · 0.85
dispatchFunction · 0.70
debugMethod · 0.45
sendMethod · 0.45
recvMethod · 0.45

Tested by 2

__next__Method · 0.64
commonMethod · 0.64