Open payne911 opened 3 years ago
Aborting all ongoing Promises isn't as trivial as I thought. There is a partial solution, but I'm still waiting on something that fulfills the 3 constraints listed there: https://stackoverflow.com/q/67086017/9768291
@micalevisk
Say I have 100 calls to make, and that after 70 I realize I need to stop. From what I understand, the AbortController
indeed helps with avoiding the necessity to await the 70 calls to receive a response. But would it help with making sure that the following 30 requests that were supposed to be issued would get cancelled before being executed?
I didn't used AbortController
API yet. But I guess each call could have its own abort signal, so you can invoke those controllers as you wish as long you track them properly
Potentially:
A proposed implementation was made there: https://github.com/useful-forks/useful-forks.github.io/issues/7#issuecomment-787044619