Add the ability for manual invalidation of requests, preventi…#28
Open
arb000r wants to merge 2 commits into
Open
Add the ability for manual invalidation of requests, preventi…#28arb000r wants to merge 2 commits into
arb000r wants to merge 2 commits into
Conversation
…ng underlying connection from being reused in custom pool implementations.
Owner
|
hi @arb000r - could you provide some use cases for the above? if we want more control over when a connection is dropped when returned to the pool I would try to make the contract stronger/better defined rather than relying on certain field(s). |
Contributor
Author
|
Heya, The example I was trying to make it fit was for expiring requests.
The ability to invalidate a certain connection arbitrarily would be useful for custom pool implementations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
I would like to propose a feature to allow manual invalidation of requests.
Currently the pool (and any custom implementations) can only rely on
disconnectedas the primary flag for overseeing that aConnectionis not pushed back into the pool. Updating it so that thedisconnectedflag could be updated did not seem to be the correct path, as it the flag would be responsible for two meanings.I introduced a new flag called
invalidatedwhich can be marked by the request, which results in the underlyingConnectionnot making it back to the pool.