←back to thread

115 points nonfamous | 2 comments | | HN request time: 0s | source
Show context
donkey_brains ◴[] No.44567557[source]
I didn’t bother to read this incredibly long write up past the introduction. But other commenters are asserting that the author expected their Lambda function to continue executing an async task after returning an HTTP response, despite numerous attempts by AWS staff to explain why that wouldn’t work. If true, that is _hilarious_. Easily one of the best stories of misguided anger/hubris/Dunning-Kruger I’ve ever heard. That’s like expecting a local function to continue executing after a `return` statement. It’s such a simple, basic principle of the platform they were trying to use.

But one thing bothers me…wouldn’t the author have encountered the exact same behavior in Azure? I guess I really will have to read this paper to find out.

replies(4): >>44567619 #>>44567724 #>>44569315 #>>44569545 #
1. jiggawatts ◴[] No.44569545[source]
> That’s like expecting a local function to continue executing after a `return` statement.

Well... they can![1]

It's definitely a thing in traditional always-running web server processes, which is all people know these days.

Many developers have never written a code for a short-lived process outside of maybe school exercises. Things like CLI tools, background jobs, etc...

[1] I get "Later!" printed out... most of the time: https://dotnetfiddle.net/ng93d4

replies(1): >>44571542 #
2. williamdclt ◴[] No.44571542[source]
Also, `defer` in go or `finally` in JS/Python