| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
There was a problem hiding this comment.
There is still a Stability: 1 - Experimental on top for the whole module.
Maybe we should remove it there and add it instead at Class: AsyncHook and Class: AsyncResource?
Don't know who this is usually handled.
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
@Flarna , I don't either ^^ Maybe someone over @nodejs/documentation knows what's the best way to do it here? |
Sorry, something went wrong.
|
@vdeturckheim what about creating new page2 for AsyncResouce and AsyncLocalStorage ? I think that makes sense as they are each a unique concept/api (although related) on their own, and if for example we ended up deprecating the lower level async hooks they could still stand on their own. I also think that would be less confusing in terms of what is experimental or not as well as being able to directly reference AsyncResouce |
Sorry, something went wrong.
|
I'm a little -0 on giving them their own import specifier / page. I think having all these diagnostic and power tools in a single place really lets the organization be closer to purpose rather than purely on API stability. I'm fine if a new page is done, but would be -1 on changing the import specifier unless there was a clearer checklist of what should cause such a change for other APIs in the future. |
Sorry, something went wrong.
|
I was not suggesting changing the import specifier, just the organization of the docs. |
Sorry, something went wrong.
|
👍 for splitting up the docs. If we're splitting the doc up here anyway, perhaps we should also include AsyncResource in the changes too while you're at it? |
Sorry, something went wrong.
|
@vdeturckheim that sounds reasonable to me. |
Sorry, something went wrong.
|
So both AsyncLocalStorage and AsyncResource on the same page? Makes sense to me. Might actually want to make it a bit more guide-like than some of the other pages, with extra front content explaining the use and caveats like context loss in more detail, then have the reference content follow. |
Sorry, something went wrong.
|
@vdeturckheim being split out looks good. I'm thinking it might make sense to put the AsyncLocalStorage part first as it seems like the simpler of the two, and one of the key reasons you need AsyncResource is to keep AsyncLocalStorage working properly in a subset of the cases so seems like a good thing to follow AsyncLocalStorage. WDYT? Just a suggestion as I'd be good either way once the TODO's are filled in. |
Sorry, something went wrong.
|
@mhdawson agreed. I updated a bit. It should start to look good now. |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks like a good start. A few thoughts:
Should AsyncLocalStorage and AsyncResource get separate pages, and related--should we aim to make them separate top-level modules eventually?
Should the requireManualDestroy option and emitDestroy method of AsyncResource remain experimental? They're perhaps a bit janky as far as features go, and one could draw some parallels to the unsafety of domains in there, though I'm not too worried about it. Perhaps just a warning about timing of the destroy?
For the intro, it would be good to elaborate on the relationship between AsyncLocalStorage on the consuming end and AsyncResource on the producing end of async context propagation semantics.
Sorry, something went wrong.
Co-authored-by: Michaël Zasso <targos@protonmail.com> Co-authored-by: Andrey Pechkurov <37772591+puzpuzpuz@users.noreply.github.com>
Signed-off-by: Michael Dawson <mdawson@devrus.com>
Signed-off-by: Michael Dawson <mdawson@devrus.com>
|
Doc only, so full CI not required. |
Sorry, something went wrong.
|
@bmeck @Qard @mcollina @bengl @vdeturckheim FYI as long as the github actions all pass I'll plan to land this tomorrow in case you want to take another look. I think I've fixed up all the things I talked with @vdeturckheim about (unless there is more that the actions run which make test locally does not run). |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
I had some comments on doc/api/async_context.md, but only after I had reviewed it and prepared them all did I realize that that page wasn't written in this PR, it was only moved. 😆 I'll submit my suggestions in a new PR once this is merged.
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
Mark AsyncLocalStorage constructor, AsyncLocalStorage.prototype.getStore(), and AsyncLocalStorage.prototype.run as stable. PR-URL: #37675 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Bryan English <bryan@bryanenglish.com>
|
Landed in 7612d82 @vdeturckheim thanks for all your work on this. |
Sorry, something went wrong.
Mark AsyncLocalStorage constructor, AsyncLocalStorage.prototype.getStore(), and AsyncLocalStorage.prototype.run as stable. PR-URL: #37675 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Bryan English <bryan@bryanenglish.com>
Notable changes: * async_hooks: * stabilize part of AsyncLocalStorage (Vladimir de Turckheim) #37675 * deps: * upgrade npm to 7.18.1 (npm-robot) #39065 * update V8 to 9.1.269.36 (Michaël Zasso) #38273 * dns: * allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099 PR-URL: #39031
Notable changes: * async_hooks: * stabilize part of AsyncLocalStorage (Vladimir de Turckheim) #37675 * deps: * upgrade npm to 7.18.1 (npm-robot) #39065 * update V8 to 9.1.269.36 (Michaël Zasso) #38273 * dns: * allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099 PR-URL: #39031
Notable changes: * async_hooks: * stabilize part of AsyncLocalStorage (Vladimir de Turckheim) #37675 * deps: * upgrade npm to 7.18.1 (npm-robot) #39065 * update V8 to 9.1.269.36 (Michaël Zasso) #38273 * dns: * allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099 PR-URL: #39031
| Back | FazBrowse Home | New Git URL |
This PR stabilizes part of the AsyncLocalStorage API.
The whole reasoning for chosing this subset of methods was discussed in #35286 (comment)
cc @bmeck @Qard @mhdawson @mcollina @bengl