#737: Design review: AbortSignal.any()

Visit on Github.

Opened May 6, 2022

Braw mornin' TAG!

I'm requesting a TAG review of AbortSignal.any(signals).

AbortSignal.any(signals) returns a signal that is aborted when any of the source signals are aborted. Developers can use this to combine independent abort sources, e.g. timeouts specified with AbortSignal.timeout() and signals associated with user input, and pass them to async APIs like fetch().

Further details:

  • I have reviewed the TAG's Web Platform Design Principles
  • The group where the incubation/design work on this is being done (or is intended to be done in the future): The explainer will likely stay in a personal repo, with conversation moving to a WHATWG (DOM) PR.
  • The group where standardization of this work is intended to be done ("unknown" if not known): WHATWG
  • Existing major pieces of multi-stakeholder review or discussion of this design: https://github.com/whatwg/dom/issues/920#issuecomment-1105756079
  • Major unresolved issues with or opposition to this design: None we're aware of
  • This work is being funded by: Google

We'd prefer the TAG provide feedback as (please delete all but the desired option):

🐛 open issues in our GitHub repo for each point of feedback

Discussions

Discussed Jul 18, 2022 (See Github)

Peter: We think we can close it as satisfied.

Sangwhan [via chat]: mechanism to remove signal seems missing, what if one signal source (that one doesn't have full control over) doesn't matter any more?

Lea: other things are similar...

Provisionally based on Sangwhan's feedback agreed to close with positive review

Comment by @LeaVerou Jul 20, 2022 (See Github)

Hi there,

We looked at this during a breakout today and we think this is ok — the addition does not introduce any new issues to the AbortSignal API.

Thank you for working with us!

Comment by @shaseley Jul 20, 2022 (See Github)

Thanks all!

Comment by @shaseley May 25, 2023 (See Github)

FYI: this feature has been merged into the dom spec (with no changes to the API since TAG review).