Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linked abort signals task list #9

Open
1 of 8 tasks
benjamingr opened this issue Dec 23, 2020 · 1 comment
Open
1 of 8 tasks

Linked abort signals task list #9

benjamingr opened this issue Dec 23, 2020 · 1 comment

Comments

@benjamingr
Copy link
Owner

benjamingr commented Dec 23, 2020

Copied from whatwg/dom#920

  • Create explainer skeleton. https://github.com/benjamingr/cancellation-use-cases/tree/main/cancellation
  • Add example use cases, including simple code samples so that people get the idea, plus a sketch of more complicated real-world situations.
  • Add description of the problem clearly as illustrated in the use cases.
  • Add comparison with other ecosystems and languages.
  • Add discussion of how people solve this today, and what the drawbacks are.
  • Add comparison between different APIs and their pros/cons and how they would look with the above use cases. Namely: new AbortController(...signals), new AbortSignal(...signals), AbortSignal.race(signal, otherSignal), signal.follow(otherSignal).
  • Add discussion of alternative approaches that would enable implementing this in userland (weak event handlers and dispose on the signal that removes the listener).
  • Set up meeting to discuss the above and invite interested parties to solicit feedback.

Also big thanks to @domenic for this list, roughly taken from here.

@benjamingr benjamingr changed the title Abort Signal linked task list. Linked abort signals task list Dec 23, 2020
@benjamingr
Copy link
Owner Author

Intuitively - when working on this there are several pros and cons:

Pros:

  • The use cases here is very compelling and reasonable.
  • The problem being worked on is real.
  • I am genuinely not sure what the better API is so I am approaching this with a "clean slate". I feel like other people who have expressed interest in this are similarly not sure about the solution - so I'm sure a lot of learning will happen.

Cons:

  • I would have preferred third-state cancellation which we will never be able to have since it was shot down by TC39.
  • This touches an area a lot of people have strong opinions about.
  • There is a reasonable chance this will not result in a new API being added since it requires the solution we come up with providing browsers with enough value for them to prioritize adding it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant