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

Method _recv

Lib/multiprocessing/connection.py:407–422  ·  view source on GitHub ↗
(self, size, read=_read)

Source from the content-addressed store, hash-verified

405 buf = buf[n:]
406
407 def _recv(self, size, read=_read):
408 buf = io.BytesIO()
409 handle = self._handle
410 remaining = size
411 while remaining > 0:
412 to_read = min(BUFSIZE, remaining)
413 chunk = read(handle, to_read)
414 n = len(chunk)
415 if n == 0:
416 if remaining == size:
417 raise EOFError
418 else:
419 raise OSError("got end of file during message")
420 buf.write(chunk)
421 remaining -= n
422 return buf
423
424 def _send_bytes(self, buf):
425 n = len(buf)

Callers 1

_recv_bytesMethod · 0.95

Calls 2

writeMethod · 0.95
readFunction · 0.50

Tested by

no test coverage detected