-
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
Consider generalising middleware by passing state into every call #816
Comments
I added this to the 1.0 milestone because it's a breaking API change, but we may decide we don't want to do anything, and that's ok too! |
So in general I like the idea but it's quite involved to implement as it requires major refactoring. AFAIU it will work like this for each connection
The neat thing about the current design is that each "method call/request" gets it's own state and it's not mutated so we don't Also Thus, I'm a bit skeptical about this approach as Mutex would be quite expensive and Can't we just provide a |
Going to close this; I don't think it's worth the time to dig into it if the current approach does what we need :) |
Currently the middleware is quite restrictive in what it enables with its passing of a copyable
Instant
from one method to another.Is it worth generalising the way that we pass state between middleware calls to give people more flexibility?
Some thoughts on things one might want to do:
It might be that we don't need to extend middleware to support this kind of thing though?
See #793 (comment)
The text was updated successfully, but these errors were encountered: