MCPcopy Index your code
hub / github.com/python/cpython / set_write_buffer_limits

Method set_write_buffer_limits

Lib/asyncio/sslproto.py:146–166  ·  view source on GitHub ↗

Set the high- and low-water limits for write flow control. These two values control when to call the protocol's pause_writing() and resume_writing() methods. If specified, the low-water limit must be less than or equal to the high-water limit. Neither value can be

(self, high=None, low=None)

Source from the content-addressed store, hash-verified

144 self._ssl_protocol._resume_reading()
145
146 def set_write_buffer_limits(self, high=None, low=None):
147 """Set the high- and low-water limits for write flow control.
148
149 These two values control when to call the protocol's
150 pause_writing() and resume_writing() methods. If specified,
151 the low-water limit must be less than or equal to the
152 high-water limit. Neither value can be negative.
153
154 The defaults are implementation-specific. If only the
155 high-water limit is given, the low-water limit defaults to an
156 implementation-specific value less than or equal to the
157 high-water limit. Setting high to zero forces low to zero as
158 well, and causes pause_writing() to be called whenever the
159 buffer becomes non-empty. Setting low to zero causes
160 resume_writing() to be called only once the buffer is empty.
161 Use of zero for either limit is generally sub-optimal as it
162 reduces opportunities for doing I/O and computation
163 concurrently.
164 """
165 self._ssl_protocol._set_write_buffer_limits(high, low)
166 self._ssl_protocol._control_app_writing()
167
168 def get_write_buffer_limits(self):
169 return (self._ssl_protocol._outgoing_low_water,

Callers

nothing calls this directly

Calls 2

_control_app_writingMethod · 0.80

Tested by

no test coverage detected