Skip to content

Commit

Permalink
gh-112169: Documented getaddrinfo/getnameinfo default loop executor u…
Browse files Browse the repository at this point in the history
…sage and implications. (#112191)

Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
  • Loading branch information
4 people authored Jun 24, 2024
1 parent 1500a23 commit fc297b4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,14 @@ DNS

Asynchronous version of :meth:`socket.getnameinfo`.

.. note::
Both *getaddrinfo* and *getnameinfo* internally utilize their synchronous
versions through the loop's default thread pool executor.
When this executor is saturated, these methods may experience delays,
which higher-level networking libraries may report as increased timeouts.
To mitigate this, consider using a custom executor for other user tasks,
or setting a default executor with a larger number of workers.

.. versionchanged:: 3.7
Both *getaddrinfo* and *getnameinfo* methods were always documented
to return a coroutine, but prior to Python 3.7 they were, in fact,
Expand Down

0 comments on commit fc297b4

Please sign in to comment.