Using Rust Futures from Python#4
Open
ThibaultLemaire wants to merge 5 commits intoChillFish8:mainfrom
Open
Conversation
I'm starting with an explanation of Python futures in Python, so we can expand on it to build a Rust awaitable that drives a Rust future. Is this making any sense? The fact that the two languages use the same denomination is a good sign for compatibility but makes the whole deal a bit confusing.
Owner
|
This look interesting 👀 |
Contributor
Author
|
Oh oops, I pushed my second commit here as well. I intended to make separate pull requests, but now that it's here... What do you prefer? That I change this PR's title or that I move my second paragraph to a different PR? |
This concludes my tutorial for writing the glue to use Rust futures from Python. From there it should be easy enough to write a library.
Contributor
Author
|
All right, so I decided to just leave everything in one big PR. I think this should be enough to explain the method I found, and to bootstrap any library that would like to implement something like this. |
ThibaultLemaire
commented
Feb 14, 2021
Owner
|
Im happy to merge this if you're happy you got everything you need in it? |
Contributor
Author
|
Not just yet, I think I should remove the double callback from the examples as it's unneeded complexity. Have you had the time to read some of it? I know it's a bit long and I don't know if it makes it any clearer. |
Contributor
Author
|
It's ready. |
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.
I'm starting with an explanation of Python futures in Python, so we can
expand on it to build a Rust awaitable that drives a Rust future.
Is this making any sense? The fact that the two languages use the same
denomination is a good sign for compatibility but makes the whole deal a
bit confusing.