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

Method _handle_request

Lib/multiprocessing/managers.py:199–227  ·  view source on GitHub ↗
(self, c)

Source from the content-addressed store, hash-verified

197 t.start()
198
199 def _handle_request(self, c):
200 request = None
201 try:
202 connection.deliver_challenge(c, self.authkey)
203 connection.answer_challenge(c, self.authkey)
204 request = c.recv()
205 ignore, funcname, args, kwds = request
206 assert funcname in self.public, '%r unrecognized' % funcname
207 func = getattr(self, funcname)
208 except Exception:
209 msg = ('#TRACEBACK', format_exc())
210 else:
211 try:
212 result = func(c, *args, **kwds)
213 except Exception:
214 msg = ('#TRACEBACK', format_exc())
215 else:
216 msg = ('#RETURN', result)
217
218 try:
219 c.send(msg)
220 except Exception as e:
221 try:
222 c.send(('#TRACEBACK', format_exc()))
223 except Exception:
224 pass
225 util.info('Failure to send message: %r', msg)
226 util.info(' ... request was %r', request)
227 util.info(' ... exception was %r', e)
228
229 def handle_request(self, conn):
230 '''

Callers 1

handle_requestMethod · 0.95

Calls 6

format_excFunction · 0.90
getattrFunction · 0.85
funcFunction · 0.50
recvMethod · 0.45
sendMethod · 0.45
infoMethod · 0.45

Tested by

no test coverage detected