-
Notifications
You must be signed in to change notification settings - Fork 172
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
Allow saving multiple streams with the same address to the pool #110
Comments
cfal
changed the title
Allow saving multiple streams to the same address to the pool
Allow saving multiple streams with the same address to the pool
Jul 4, 2020
Would a PR for this be accepted? I have a small change that does this but removed the MAX_IDLE_CONNECTIONS constant and added constants MAX_IDLE_HOSTS and MAX_IDLE_CONNECTIONS_PER_HOST. Could set this to 100 and 1 respectively by default to keep the behavior the same. But then it could also be nice to make these values configurable. |
I think that's a good change! PR sounds good! |
jsha
pushed a commit
that referenced
this issue
Sep 13, 2020
Adds set_max_idle_connections and set_max_idle_connections_per_host. This turns the values of Pool.recycle into a VecDeque of Streams for the same PoolKey. The freshest stream (most recently used) is at the back; the stalest stream is at the front. This also removes the invariant "Each PoolKey exists in recycle at most once and lru at most once," replacing it with "each PoolKey has the same number of entries in lru as in recycle." Fixes #110
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be useful to be able to save multiple streams to the same address in the connection pool - for example, when doing chunked downloading via Range header, multiple connections can be used and reused.
The text was updated successfully, but these errors were encountered: