Hacker News new | past | comments | ask | show | jobs | submit login

Still hoping for official promise-kill+timeout support.



What's that? Some alternative to AbortSignal to gently prevent async code from continuing all the way to its logical conclusion?

Also please be sensitive and don't use "kill" in new code. ;) We already have to deal with "abort".


Yeah, kill is very tasteless. We're migrating our code base to use the new term "fuckingAnnihilateRuthlessly" instead.


Personally, "abort" is kinda gross to me due to calling to mind certain unsavory images, but that's clearly my problem, not Node's!


> What's that? Some alternative to AbortSignal to gently prevent async code from continuing all the way to its logical conclusion?

Yes, a way to terminate down-stream. It turns out to be a pretty messy problem. I didn't know AbortSignal was in Node now. It's been a while since I revisited this issue. I should read more.

> Also please be sensitive and don't use "kill" in new code. ;) We already have to deal with "abort".

Point taken!


This is something TC39 would be responsible for, not the Node project.


Do you mean it is a language issue and not an implementation issue?


Wouldn't Observables be a lot better for this kind of use case?

"The right tool for the right job" and all that jazz.


> Wouldn't Observables be a lot better for this kind of use case?

Observables are neither a part of the language nor a part of the Node api. I suppose that was what the parent's criterion.


Correct, NodeJS native. I can't edit my post now, but thanks for clarifying.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: