Re: [whatwg/dom] Expose an `aborted` promise on AbortSignal? (#946)

That doc clearly shows we’re in territory that’s been tread before. What happened to the last search party who went down here? (Were their bodies recovered at least?)

Reading it also made me realize that in my first comment here, I failed to explain one of the key reasons I think the API guiding folks towards an “every await should honor the signal” model is important. Picture a `clicks` async generator function — `await (let event of clicks(signal))` — which async-iterates window click events. If `clicks` checks the signal’s status _between_ each “click promise” yield — `if (signal.aborted) {...}` — it’s implementing a very different (and very likely, unexpected) abort/cancellation behavior than if the yielded promises each raced the signal.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/946#issuecomment-846070996

Received on Friday, 21 May 2021 16:11:28 UTC