I have an app containing some resumable subs that may take a long time to complete. I would like to add a button that would break in and stop the subs, without finishing the activity or closing the application. Is there a way to instruct the currently running sub to stop?
I would set a Global flag that the sub /s occasionally checks , only continuing if the flag state is unchanged...
OR Exits if the flag has been changed (by your button or other method).