-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Extend N-API to cover libnode
#43516
Comments
Duplicate of #23265 |
@legendecas one very significant difference of this proposal and my implementation is that draining the event loop is a separate API call - something that I did consider too. I wonder if there is any point in doing this? The current implementation does not allow to wait for all async tasks to finish and then to reuse the environment - at this point it must be destroyed. |
I'm not sure I get your point about "current implementation" correctly. If you are referring to the Node.js embedder API, I think people can already get the uv loop and drain the queue with APIs like |
@legendecas I am open to all constructive suggestions. |
I am closing this issue so that there is a single discussion |
What is the problem this feature will solve?
Currently when using
libnode
one has to use raw V8 primitives or to manually construct anapi_env
by includingnode_api_internals.h
which is normally not exported and has other internal dependencies.What is the feature you are proposing to solve the problem?
Add a N-API primitive for creating a Node environment (the code in
embedtest.cc
) that constructs anapi_env
What alternatives have you considered?
node_api_internals.h
and manually constructing anapi_env
- requires access to Node internal structures that are normally not exportedThe text was updated successfully, but these errors were encountered: