Skip to content

Conversation

@ThibaultLemaire
Copy link
Contributor

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.

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.
@ChillFish8
Copy link
Owner

This look interesting 👀

@ThibaultLemaire
Copy link
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.
@ThibaultLemaire ThibaultLemaire changed the title Add Python implementation for asyncio.Future Using Rust Futures from Python Feb 14, 2021
@ThibaultLemaire
Copy link
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.

@ChillFish8
Copy link
Owner

Im happy to merge this if you're happy you got everything you need in it?

@ThibaultLemaire
Copy link
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.

@ThibaultLemaire
Copy link
Contributor Author

It's ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants