Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
src,async_hooks,n-api: refactor async callback handling#14697
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
addaleax commented Aug 8, 2017 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
jasongin commented Aug 8, 2017
N-API parts look good. I'm still planning to add an async context parameter to If I'm understanding correctly, the change in this PR means that when the N-API async work APIs are used, during the |
addaleax commented Aug 8, 2017
@jasongin This PR would mean that |
jasongin commented Aug 8, 2017
Oh, so the async work callback should just call Then the only need for |
jasongin commented Aug 8, 2017
In that case should |
addaleax commented Aug 8, 2017
@jasongin Exactly 👍
Right. Done! |
4dceb50 to c5cc1cfCompare65dfc41 to b7f6ca7Compareaddaleax commented Aug 14, 2017
Rebased … maybe somebody of @AndreasMadsen@trevnorris@refack@TimothyGu@tniessen@bnoordhuis@jasnell could be reviewer (if only for the yet-unreviewed non-N-API part)? |
doc/api/n-api.md Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: exposed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, fixed.
With `CallbackScope`, this has become possible to do properly. Fixes: nodejs/node#5691 PR-URL: nodejs/node#14697 Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#14697 Reviewed-By: Trevor Norris <[email protected]>
PR-URL: nodejs/node#14697 Reviewed-By: Anna Henningsen <[email protected]>
Enable combining N-API async work with async-hooks. PR-URL: nodejs#14697 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jason Ginchereau <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
PR-URL: nodejs#14697 Reviewed-By: Anna Henningsen <[email protected]>
Enable combining N-API async work with async-hooks. Backport-PR-URL: #19447 PR-URL: #14697 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jason Ginchereau <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Backport-PR-URL: #19447 PR-URL: #14697 Reviewed-By: Anna Henningsen <[email protected]>
MakeCallback()implementationsCallbackScopeclass for embedders in order to enableMakeCallback()-like behaviour without tying that to calling a JS functionChecklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
/cc @nodejs/async_hooks
/cc @nodejs/n-api (Who may or may not only want to review the N-API commit; this is a breaking N-API change)