-
Notifications
You must be signed in to change notification settings - Fork 22
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
Async extract for KeyExtractor #44
Comments
Sounds like a good idea. I don't have time to address this issue though. I just review and merge PRs currently.
I just published 0.4.1 :) |
Hello @AaronErhardt I hope you are well. What do you think about adding a feature called "async" that converts everything to async? Or do you have another suggestion? |
Cargo features should only be additive (adding features should not break your existing code) which means converting is not the right approach. We could however use two feature flags "sync" and "async" where each of them enables a certain part of the code. On the other side, since actix is already async, we could just make async key extractors the only option. Overall, I think the best approach would be to first implement an async key extractor based on the current code and see how the diff looks before deciding whether to use (which) feature flags. |
It adds a feature to the project to make it asynchronous right?
But this will make a breaking changes, and we have just released 0.5.0. I think it is right that we make the "async" feature because it will provide an async support for those who need it and won't make any breaking changes either. As for the "async" and "sync" features, this is not actually correct action, because firstly, they will make breaking changes, and secondly, if none of them are activated, this will be a malfunction (we can do "sync" or "async" if none of them are activated, but it is not with correct use) |
If that's what you meant, that's correct. You used the word "converting" which can be interpreted as converting existing traits or function signatures to use async, which would be wrong. We can also just add an "async" feature and make the sync code compile unconditionally to avoid breaking changes. But releasing 0.6 wouldn't be too big of a deal either. Regardless of all the discussions about features, we first need some sort of basic implementation and look how the changes affect the API. If we reached that point, it should be easy to figure out the best feature flags. |
Can you assign it to me please |
Sorry I can't work on this, I haven't been using Actix for a while |
Hello! Would it be possible to support an async extract for the key extractor? I would like to access a tokio mutex when extracting the key. I cannot use the blocking lock as I am using an async runtime. Thanks!
Also, it would be great if the recent key whitelist additions could be pushed to crates.io :)
The text was updated successfully, but these errors were encountered: