-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-41279: Add StreamReaderBufferedProtocol #21446
base: main
Are you sure you want to change the base?
Commits on Jul 8, 2022
-
bpo-41279: Add StreamReaderBufferedProtocol (pythonGH-21446)
This class gets better performance as BufferedProtocol uses read_into into a buffer allocated before, instead of allocating a new buffer each time read is called.
Configuration menu - View commit details
-
Copy full SHA for 9a65cfe - Browse repository at this point
Copy the full SHA 9a65cfeView commit details -
bpo-41279: Add support for BufferedProtocol in _UnixReadPipeTransport (…
…pythonGH-21446) The transport did not know how to use the proper api exported by BufferedProtocol. Added a new callback function that calls getbuffer() and buffer_updated() instead of data_received() when the protocol given to it is of type BufferedProtocol. This is exactly the same way _SelectorSocketTransport handles a BufferedProtocol.
Configuration menu - View commit details
-
Copy full SHA for 6db642c - Browse repository at this point
Copy the full SHA 6db642cView commit details -
bpo-41279: Add support for BufferedProtocol in _ProactorReadPipeTrans…
…port (pythonGH-21446) In the __init__ function if the protocol is of instance BufferedProtocol instead of creating a buffer object, we call get_buffer on the protocol to get its buffer. In addition _loop_reading now calls _data_received as soon as there is actual data instead of calling only after adding a recv_into event. The reason for this change is because read_into could call it's callback immediatly meaning overriding the data on the buffer before we actually call _data_received on it, which fixes the potential issue of missed data.
Configuration menu - View commit details
-
Copy full SHA for 71d6a90 - Browse repository at this point
Copy the full SHA 71d6a90View commit details -
bpo-41279: Support resetting a protocol in _ProactorReadPipeTransport (…
…pythonGH-21446) When calling set_protocol to change the protocol you can now change the type of the protocol from BufferedProtocol to Protocol or vice versa. start_tls needed this feature as it could read into a buffered protocol at first and then change the protocol to SSLProto which is a regular protocol.
Configuration menu - View commit details
-
Copy full SHA for cdc14d8 - Browse repository at this point
Copy the full SHA cdc14d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e81f1a - Browse repository at this point
Copy the full SHA 9e81f1aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3dc4d18 - Browse repository at this point
Copy the full SHA 3dc4d18View commit details