mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
[3.12] gh-112169: Documented getaddrinfo/getnameinfo default loop executor usage and implications. (GH-112191) (#120936)
gh-112169: Documented getaddrinfo/getnameinfo default loop executor usage and implications. (GH-112191)
(cherry picked from commit fc297b4ba4
)
Co-authored-by: Alek Kowalczyk <alek.kowalczyk@gmail.com>
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>
This commit is contained in:
parent
69bd1a8da0
commit
3afb856dda
1 changed files with 8 additions and 0 deletions
|
@ -1139,6 +1139,14 @@ DNS
|
||||||
|
|
||||||
Asynchronous version of :meth:`socket.getnameinfo`.
|
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
|
.. versionchanged:: 3.7
|
||||||
Both *getaddrinfo* and *getnameinfo* methods were always documented
|
Both *getaddrinfo* and *getnameinfo* methods were always documented
|
||||||
to return a coroutine, but prior to Python 3.7 they were, in fact,
|
to return a coroutine, but prior to Python 3.7 they were, in fact,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue