Initiate all pending requests from the deque following FIFO We make sure that at any time {allowed_max_concurrent_streams} streams are active.
(self)
| 174 | ) |
| 175 | |
| 176 | def _send_pending_requests(self) -> None: |
| 177 | """Initiate all pending requests from the deque following FIFO |
| 178 | We make sure that at any time {allowed_max_concurrent_streams} |
| 179 | streams are active. |
| 180 | """ |
| 181 | while ( |
| 182 | self._pending_request_stream_pool |
| 183 | and self.metadata["active_streams"] < self.allowed_max_concurrent_streams |
| 184 | and self.h2_connected |
| 185 | ): |
| 186 | self.metadata["active_streams"] += 1 |
| 187 | stream = self._pending_request_stream_pool.popleft() |
| 188 | stream.initiate_request() |
| 189 | self._write_to_transport() |
| 190 | |
| 191 | def pop_stream(self, stream_id: int) -> Stream: |
| 192 | """Perform cleanup when a stream is closed""" |
no test coverage detected