I had a use case recently where I was building a custom framework for managing background jobs. It needed to be possible for the user to cancel a long-running background job, which should cancel its execution. In Node, that's actually pretty hard to do. If you have a bunch of promises running that are doing things like HTTP requests, there are only very minimal options available to cancel these. The 'official' one would be to create an AbortController and pass this along to the job, and make ...
No comments yet. Log in to reply on the Fediverse. Comments will appear here.