MCPcopy Index your code
hub / github.com/python/cpython / _handle_request

Method _handle_request

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

Source from the content-addressed store, hash-verified

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

Callers 1

handle_requestMethod · 0.95

Calls 5

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

Tested by

no test coverage detected