This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ysangkok+launchpad
Recipients asvetlov, ysangkok+launchpad, yselivanov
Date 2018-08-15.17:38:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1534354732.89.0.56676864532.issue34411@psf.upfronthosting.co.za>
In-reply-to
Content
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)))
History
Date User Action Args
2018-08-15 17:38:52ysangkok+launchpadsetrecipients: + ysangkok+launchpad, asvetlov, yselivanov
2018-08-15 17:38:52ysangkok+launchpadsetmessageid: <1534354732.89.0.56676864532.issue34411@psf.upfronthosting.co.za>
2018-08-15 17:38:52ysangkok+launchpadlinkissue34411 messages
2018-08-15 17:38:52ysangkok+launchpadcreate