How can I stop processing a function before it completes?
I've two tabs on a webpage. When a user switches the tab, it displays its respective layout and it performs some tasks. If a user switches the tab back to one then it becomes slow and it is very visible on the webpage.
So, how can I stop any processing of the respective tab if a user switches tab very quickly?