I have a background task that upload images and videos to the server.
The user can cancel this operation in the middle.
I was wondering if there is an easy way to notify the tasks to stop instead of having a boolean that needs to be checked in order to stop
(and the main problem is that the user can go back to the process once again and re-activate the boolean before the "bad" video finishes uploading)