Handling User-Initiated Interruptions in Async Effects

Hi there! I've just started with effect. I read about the interruption model and especially the following point listed in the docs:
"In interactive applications, a user may want to stop some already running tasks, such as clicking on the "stop" button to prevent downloading more files."

Does someone have an example how this should be handled? I'd like to run several async effects, but if the user presses a button I want to interrupt all and also have a way to determine for each caller if the effect was interrupted.

After the button was clicked, all future calls should then also be able to be interrupted again?

I tried passing an abort signal to runPromise, which works. But the cause is a sequential one and I don't know how to identify that the user executed a manual interruption.
Was this page helpful?