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

Method _get_more_data

Lib/multiprocessing/connection.py:348–361  ·  view source on GitHub ↗
(self, ov, maxsize)

Source from the content-addressed store, hash-verified

346 return bool(wait([self], timeout))
347
348 def _get_more_data(self, ov, maxsize):
349 buf = ov.getbuffer()
350 f = io.BytesIO()
351 f.write(buf)
352 left = _winapi.PeekNamedPipe(self._handle)[1]
353 assert left > 0
354 if maxsize is not None and len(buf) + left > maxsize:
355 self._bad_message_length()
356 ov, err = _winapi.ReadFile(self._handle, left, overlapped=True)
357 rbytes, err = ov.GetOverlappedResult(True)
358 assert err == 0
359 assert rbytes == left
360 f.write(ov.getbuffer())
361 return f
362
363
364class Connection(_ConnectionBase):

Callers 1

_recv_bytesMethod · 0.95

Calls 6

writeMethod · 0.95
lenFunction · 0.85
_bad_message_lengthMethod · 0.80
ReadFileMethod · 0.80
GetOverlappedResultMethod · 0.80
getbufferMethod · 0.45

Tested by

no test coverage detected