tc39 / proposal-async-context

Async Context for JavaScript
https://tc39.es/proposal-async-context/
Creative Commons Zero v1.0 Universal
564 stars 13 forks source link

What does this API do? #2

Closed littledan closed 4 years ago

littledan commented 4 years ago

The description of the problem space and priorities in the README is great. For the solution, I see a signature of the classes and some high-level explanation of their role, but it'd be great to also have an explanation of what each of the classes represents in a bit more detail, and what each of the methods do. Right now, it's hard for me to understand.

hax commented 4 years ago

I guess the api is same as https://nodejs.org/api/async_hooks.html#async_hooks_class_asynclocalstorage .

legendecas commented 4 years ago

Yes, the API is similar to the current implementation in Node.js. I'll update the document text to reflect that, and point out the differences.

littledan commented 4 years ago

The current explainer shows this very well. Good work!