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

Method reader

Lib/test/test_asyncio/test_events.py:520–531  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

518 bytes_read = bytearray()
519
520 def reader():
521 try:
522 data = r.recv(1024)
523 except BlockingIOError:
524 # Spurious readiness notifications are possible
525 # at least on Linux -- see man select.
526 return
527 if data:
528 bytes_read.extend(data)
529 else:
530 self.assertTrue(self.loop.remove_reader(r.fileno()))
531 r.close()
532
533 self.loop.add_reader(r.fileno(), reader)
534 self.loop.call_soon(w.send, b'abc')

Callers

nothing calls this directly

Calls 8

lenFunction · 0.85
assertTrueMethod · 0.80
recvMethod · 0.45
extendMethod · 0.45
remove_readerMethod · 0.45
filenoMethod · 0.45
closeMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected