@mauve as in the scheduler or a more low level design like, uh, "I want to replicate Go's context.Context cancellation" ?

@Miaourt Just high level making sure you handle cancellation in every program that uses async code. It can be hard to answer "What is the best way to handle this long running task needing to stop half way through at arbitrary points". In my case it's needing to stop indexing events from a queue due to teardown of the indexer instance.

@mauve oh crap brainfart wanted to type "high level" instead of "low level"

Well, I guess you could check, between request batches, if you need to stop nor process more.
In Go this is essential idiomatically done with a dumb mutex for this check. (context.Context type)

Sign in to participate in the conversation
Mauvestodon

Escape ship from centralized social media run by Mauve.