Open sonicisthebest opened 7 years ago
Hi. Neat library.
Just testing things out using asyncio and I noticed some blocking code in the asyncio examples. It seems that UdpTransportTarget((host, port)) is calling to resolve DNS in a blocking manor, which causes delay on the asyncio event loop.
Looks like the asyncio version may need a coroutine based DNS resolution. Perhaps using https://docs.python.org/3.5/library/asyncio-eventloop.html#asyncio.AbstractEventLoop.getaddrinfo
Indeed! I will fix that eventually. Unless you come up with a PR before. ;)
Fixed and will ship in the next 7.0.x release.
Hi. Neat library.
Just testing things out using asyncio and I noticed some blocking code in the asyncio examples. It seems that UdpTransportTarget((host, port)) is calling to resolve DNS in a blocking manor, which causes delay on the asyncio event loop.
Looks like the asyncio version may need a coroutine based DNS resolution. Perhaps using https://docs.python.org/3.5/library/asyncio-eventloop.html#asyncio.AbstractEventLoop.getaddrinfo