In my App, I have a menu which loads a page making a http request to retrieve data. This http request usually last ~500ms or more.
Right now, I use an async method which nicely shows a progressRing during the loading.
Problem starts when I start to click on several menu input in a row (like 5 items in 1 second) => Pages loads one after the other.
I would like to kill the current process and launch the new process everytime the user select a new menu input.
I've found here and here that Thread.Abort is not a good practice. (was my first idea) I've also found here I might use a task. But I can't set up correctly the cancelation event (it's not like in the exemple, where they just loop and decide to raise the cancelation event, i have a http request going on)
Is there any good practice out there?
Thx a lot !