[issue34411] ProactorEventLoop should use implement GetAddrInfo, GetNameInfo

ysangkok+launchpad report at bugs.python.org
Wed Aug 15 13:38:52 EDT 2018


ysangkok+launchpad <ysangkok at gmail.com> added the comment:

As far as our experiments show, the requests are blocking each other irrespective of thread pool size. Which is expected since the lock is global across threads.

Am I correct in assuming that an implementation for the ProactorEventLoop with IOCP would not require a global lock?

Here is our code, this takes 12 sec on Ubuntu and ~12*100 secs on Windows (cause a failed DNS request takes 10 sec):

import asyncio

futs = []
for i in range(100):
  t = asyncio.get_event_loop().getaddrinfo("aa000000aa"+str(i)+".onion.", 80)
  futs.append(t)

print(asyncio.get_event_loop().run_until_complete(asyncio.gather(*futs, return_exceptions=True)))

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34411>
_______________________________________


More information about the Python-bugs-list mailing list