-
Notifications
You must be signed in to change notification settings - Fork 556
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 running SharedConnection with any other runtime #229
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Might be a good idea to make tokio_executor
an optional (but default dependency) as well?
Oh, that makes sense. I agree. |
Hmm, we also depend on tokio-tcp/tokio-uds 0.1. Isn't that also an issue for you? The connection should really be parameterized by |
No. In my project, the problem now is that the redis-rs require different runtime. For me, mixing tokio 0.1 and tokio 0.3 is not a problem. Because futures 0.1 and futures 0.3 can be used together. Therefore, even if redis-rs depends on tokio-tcp / uds 0.1.x, it can be run on the tokio 0.3 runtime. The only incompatibility is the runtime that is running in the application. |
* Python: Add `PFADD` command. (redis-rs#229) * Add `PFADD` command. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * BLACK I HATE YOU Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * PR comments. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * Update CHANGELOG.md Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com> --------- Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com> * Apply suggestions from code review Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com> * PR comments. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> * PR comments. Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> --------- Signed-off-by: Yury-Fridlyand <yury.fridlyand@improving.com> Co-authored-by: Aaron <69273634+aaron-congo@users.noreply.github.com> Co-authored-by: Shoham Elias <116083498+shohamazon@users.noreply.github.com>
Currently, SharedConnection only works on tokio 0.1 runtime.
Because it depends on
tokio_executor::spawn
(with tokio 0.1.x).( https://github.com/mitsuhiko/redis-rs/blob/master/src/aio.rs#L437
I want to use SharedConnection with
async/await
in tokio 0.3.In this PR, for that purpose, make it can be specified Executor from outside without depending on a specific Executor.
( This way is also adopted for hyper , rusoto, and more.
For example, 0.3 Executor will work with 0.1 adapter as below:
Compatibility layers is: