-
Notifications
You must be signed in to change notification settings - Fork 332
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
Implement cross-language await syntax for KJ Promises and Rust Futures #3280
base: main
Are you sure you want to change the base?
Conversation
317008e
to
dc5479b
Compare
Would it be reasonable to request a README.md on the src/rust/async directory explaining what we're doing, the approach and maybe pointers as to how to understand the code? Which part interacts with which and in what way? |
Definitely! I won't ask for review until code comments are fleshed out, and I have an explainer written. |
933578e
to
65c05c2
Compare
The c++ parts are looking good. One concern I do have is this is a fairly large complicated bit of code... would it make sense / be possible for it to be split out into a separate dependency outside of workerd? |
@jasnell Yes, I agree. I think the capnproto repo is the most logical home for most of this, maybe in kj/compat. Or a separate repo, call it kj-rs, could also make sense. I'll keep it here in draft form for now while I iterate, but will think about how to support this in capnproto's build. |
8fb92fd
to
58890d0
Compare
Awaiter was renamed to PromiseAwaiter in a recent capnproto update.
This commit also includes various other refactors.
58890d0
to
1b1056e
Compare
This seemed like unjustifiable complexity.
1b1056e
to
9c43b07
Compare
32a634f
to
e1d470f
Compare
CoAwaitWaker is now a simpler data structure, with a new FuturePollEvent base class taking on the burden of connecting the various events and promises.
Associated pull request(s):