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

Method reader

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

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