[issue34411] ProactorEventLoop should use implement GetAddrInfo, GetNameInfo

2018-08-15 Thread ysangkok+launchpad
ysangkok+launchpad added the comment: The lock I was referring to is https://github.com/python/cpython/blob/e0b5b2096ead4cc094a129ce7602ac5c0e998086/Modules/socketmodule.c#L222 Is netdb_lock the GIL? If the thread pooling was effective, the slowdown wouldn't be linear, but it does i

[issue34411] ProactorEventLoop should use implement GetAddrInfo, GetNameInfo

2018-08-15 Thread ysangkok+launchpad
ysangkok+launchpad 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

[issue34411] ProactorEventLoop should use implement GetAddrInfo, GetNameInfo

2018-08-15 Thread ysangkok+launchpad
New submission from ysangkok+launchpad : Since socket.getaddrinfo and socket.getnameinfo take a lock on Windows, it would be nice to have their corresponding methods in asyncio.ProactorEventLoop use IOCP, so that they wouldn't block the whole event loop. Overlapped I/O flags are avai