I am facing a unique scenario where I am using an RxJS interval, but I might need to abruptly stop it at any point. I thought there would be a simple method like cancel() or stop() similar to clearTimeout for intervals. Is there a way to stop an interval once it has started? If not, what alternative approach can I take?
Essentially, I am iterating through a large array but certain external events may require me to halt the iteration and move on to a different task. I am hoping that there is a straightforward solution that I may have overlooked in the documentation. Thank you.