diff options
author | Yury Selivanov <yury@magic.io> | 2018-05-28 18:31:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-28 18:31:55 -0400 |
commit | 7165754b6b5f3b7c07050d921fa1c58bba5f0ff1 (patch) | |
tree | a459d092b94d1c8e9498842192735f8486dd926e /Lib/asyncio/constants.py | |
parent | 416c1ebd9896b394790dcb4f9f035b1a44ebe9ff (diff) | |
download | cpython-git-7165754b6b5f3b7c07050d921fa1c58bba5f0ff1.tar.gz |
bpo-32410: Avoid blocking on file IO in sendfile fallback code (GH-7172)
Diffstat (limited to 'Lib/asyncio/constants.py')
-rw-r--r-- | Lib/asyncio/constants.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/asyncio/constants.py b/Lib/asyncio/constants.py index 739b0a70c1..d7ba496942 100644 --- a/Lib/asyncio/constants.py +++ b/Lib/asyncio/constants.py @@ -14,6 +14,10 @@ DEBUG_STACK_DEPTH = 10 # Number of seconds to wait for SSL handshake to complete SSL_HANDSHAKE_TIMEOUT = 10.0 +# Used in sendfile fallback code. We use fallback for platforms +# that don't support sendfile, or for TLS connections. +SENDFILE_FALLBACK_READBUFFER_SIZE = 1024 * 256 + # The enum should be here to break circular dependencies between # base_events and sslproto class _SendfileMode(enum.Enum): |