-
Notifications
You must be signed in to change notification settings - Fork 351
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 support #106
async support #106
Conversation
@nappa85: Thanks for opening this! I think allowing folks to write async Lambda functions is a good idea, but given the upcoming stabilization of async/await and std::future, I was thinking of introducing a clean break and enforcing async/await first: https://paper.dropbox.com/doc/Lambda-Runtime-for-Rust-0.3--Ac2u75PLCibbXervTP2Rv5z_AQ-jLrDOiKk815YyIHLWva7M. Any thoughts? |
The vision looks super dope! What I like about this pull is its relatively transparent for users to upgrade to the next version of the interface in this pull returning something that implements IntoFuture which gets the best of both worlds because todays Result interface should just work in most cases. That enables new future returning funcs and for sync funcs it should "just work" and no added syntactic cost. I think the vision in the linked document could be possible even with this implementation as a graduating step. What I really liked in the doc was that it touched on a more painful part of todays interface, a less strict error representation! Satisfying HandlerError types have been a much more economic pain point than block_on calls. I'm a fan of where the async/await syntax is going but I'm an even bigger fan of using a compromise that works on stable Rust today ;) |
Oh, I’m really sorry! I’m in favor of merging this change, and I have no idea why I said “introducing async/await first!” I must’ve not been paying attention when typing. Really sorry!
…________________________________
From: Doug Tangren <[email protected]>
Sent: Friday, May 10, 2019 11:06 PM
To: awslabs/aws-lambda-rust-runtime
Cc: David Barsky; Comment
Subject: Re: [awslabs/aws-lambda-rust-runtime] async support (#106)
The vision looks super dope!
What I like about this pull is its relatively transparent for users to upgrade to the next version of the interface in this pull returning something that implements IntoFuture which gets the best of both worlds because todays Result interface should just work in most cases. That enables new future returning funcs and for sync funcs it should "just work" and no added syntactic cost.
I think the vision in the linked document could be possible even with this implementation as a graduating step. What I really liked in the doc was that it touched on a more painful part of todays interface, a less strict error representation! Satisfying HandlerError types have been a much more economic pain point than block_on calls.
I'm a fan of where the async/await syntax is going but I'm an even bigger fan of using a compromise that works on stable Rust today ;)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#106 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAPY2PWDOFRPV5LKA2WFGW3PUYZ27ANCNFSM4HMBXCWQ>.
|
Sorry for late reply. |
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.
Thanks for this! Can those small nits be addressed and then we can merge/release?
Hello, sorry to bother you all... |
Not a bother! I don’t have any additional concerns merging this and would be happy if @sapessi or @softprops don’t have any concerns.
…________________________________
From: Marco Napetti <[email protected]>
Sent: Tuesday, May 28, 2019 6:09 AM
To: awslabs/aws-lambda-rust-runtime
Cc: David Barsky; Comment
Subject: Re: [awslabs/aws-lambda-rust-runtime] async support (#106)
Hello, sorry to bother you all...
Are there still open tasks blocking this merge?
Thank you
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#106?email_source=notifications&email_token=AAPY2PWVGWMJCAIS6BPDHP3PXUAHNA5CNFSM4HMBXCW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWLURDI#issuecomment-496453773>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAPY2PXCPY3IRD24EWP2GCDPXUAHNANCNFSM4HMBXCWQ>.
|
I'm feelin it |
Bump |
hi! what's the status of this PR? I would really like to start using async lambdas. |
any update on this @davidbarsky @nappa85 ? |
bump. update? |
Just checking in. :) |
You should be able to pull from the master branch and take this for a spin. It doesn’t suck. |
I think this can be closed now |
Yes, this can be closed, async works very well on rust-lambda for a while now 🚀 |
Going to close this PR as it seems all is well here! |
Issue #14
The main loop has been converted into a future::LoopFn, who takes ownership on the Runtime.
Now it is possible to use async code inside lambdas.
By submitting this pull request