MCPcopy Index your code
hub / github.com/MagicStack/asyncpg / _main

Method _main

asyncpg/_testbase/fuzzer.py:94–106  ·  view source on GitHub ↗
(self, started_event)

Source from the content-addressed store, hash-verified

92 self.loop.close()
93
94 async def _main(self, started_event):
95 self.listen_task = asyncio.ensure_future(self.listen())
96 # Notify the main thread that we are ready to go.
97 started_event.set()
98 try:
99 await self.listen_task
100 finally:
101 for c in list(self.connections):
102 c.close()
103 await asyncio.sleep(0.01)
104 if hasattr(self.loop, 'remove_reader'):
105 self.loop.remove_reader(self.sock.fileno())
106 self.sock.close()
107
108 async def listen(self):
109 while True:

Callers 1

_start_threadMethod · 0.95

Calls 2

listenMethod · 0.95
closeMethod · 0.45

Tested by

no test coverage detected