doc,src: clarify that one napi_env is for each specific module#31102
Closed
legendecas wants to merge 1 commit intonodejs:masterfrom
Closed
doc,src: clarify that one napi_env is for each specific module#31102legendecas wants to merge 1 commit intonodejs:masterfrom
legendecas wants to merge 1 commit intonodejs:masterfrom
Conversation
Member
Author
|
/cc @nodejs/n-api |
doc/api/n-api.md
Outdated
Contributor
There was a problem hiding this comment.
Maybe we should just change the last sentence to this:
"Caching the `napi_env` for the purpose of general reuse, and passing the napi_env between instances of the same addon running on different [`Worker`][] threads is not allowed. The napi_env becomes invalid when an instance of a native addon is unloaded. Notification of this event is delivered through the callbacks given to [`napi_add_env_cleanup_hook`][] and [`napi_set_instance_data`][]."
Member
|
Ping @legendecas |
Member
Author
|
@gabrielschulhof Updated :D |
gengjiawen
approved these changes
Jan 7, 2020
Member
|
@legendecas looks like the linter failed. Can you review the failures and update. |
gabrielschulhof
approved these changes
Jan 8, 2020
Collaborator
gabrielschulhof
pushed a commit
that referenced
this pull request
Jan 8, 2020
PR-URL: #31102 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Contributor
|
Landed in 96eceb7. |
MylesBorins
pushed a commit
that referenced
this pull request
Jan 16, 2020
PR-URL: #31102 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Merged
codebytere
pushed a commit
that referenced
this pull request
Mar 14, 2020
PR-URL: #31102 Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One napi_env is for each specific module in one context.
Related: #28682
Fixes: #31003
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes