Skip to content

Comment on You can't cancel a JavaScript promise (except sometimes you can)parent

Comments

    > ...constantly manage the lifecycle of cancellation sources
Very rare unless you are spawning your own.

Usually, you are passing through a runtime provided token (e.g. ASP.NET).

Not that rare in my experience, I constantly had to write software like this. Not every day, but it certainly did come up quite often in my code and others'

Oh and oone more thing - the very (developer-managed) complexity makes it that people constantly got it wrong, usually just enough (as often with the case of threading) that it worked fine 90% of the time, and was very hard to make a case to management why we should invest effort into fixing it.

Not rare in the slightest. C# is used in a lot of places that aren't the web and don't have extra frameworks piled on.

If you're writing a bare C# library for desktop deployment, you're managing your own cancellation sources.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.