4 ms·
Still hoping for official promise-kill+timeout support.
by SavantIdiot 6y ago
Still hoping for official promise-kill+timeout support.
- Me1000 6y agoThis is something TC39 would be responsible for, not the Node project.
- SavantIdiot 6y agoDo you mean it is a language issue and not an implementation issue?
- Oddskar 6y agoWouldn't Observables be a lot better for this kind of use case? "The right tool for the right job" and all that jazz.
- azangru 6y ago> 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.
- SavantIdiot 6y agoCorrect, NodeJS native. I can't edit my post now, but thanks for clarifying.
- megous 6y agoWhat'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".
- steve_adams_86 6y agoYeah, kill is very tasteless. We're migrating our code base to use the new term "fuckingAnnihilateRuthlessly" instead.
- SavantIdiot 6y agoPersonally, "abort" is kinda gross to me due to calling to mind certain unsavory images, but that's clearly my problem, not Node's!
- SavantIdiot 6y ago> 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!