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

Method run_main

Lib/test/test_asyncio/test_ssl.py:1018–1035  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1016 new_tr.close()
1017
1018 async def run_main():
1019 on_con = self.loop.create_future()
1020 on_eof = self.loop.create_future()
1021 on_con_lost = self.loop.create_future()
1022 proto = ServerProto(on_con, on_eof, on_con_lost)
1023
1024 server = await self.loop.create_server(
1025 lambda: proto, '127.0.0.1', 0)
1026 addr = server.sockets[0].getsockname()
1027
1028 with self.tcp_client(lambda sock: client(sock, addr),
1029 timeout=self.TIMEOUT):
1030 await asyncio.wait_for(
1031 main(proto, on_con, on_eof, on_con_lost),
1032 timeout=self.TIMEOUT)
1033
1034 server.close()
1035 await server.wait_closed()
1036
1037 self.loop.run_until_complete(run_main())
1038

Callers

nothing calls this directly

Calls 9

tcp_clientMethod · 0.95
ServerProtoClass · 0.70
mainFunction · 0.50
create_futureMethod · 0.45
create_serverMethod · 0.45
getsocknameMethod · 0.45
wait_forMethod · 0.45
closeMethod · 0.45
wait_closedMethod · 0.45

Tested by

no test coverage detected