-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Worker threads and Native addons requiring #25662
Comments
bnoordhuis
added
question
Issues that look for answers.
worker
Issues and PRs related to Worker support.
labels
Jan 23, 2019
Hi @bnoordhuis , There are multiple open issues relating to integrated in the way you are hoping for. In short, it is "in the works" I believe: #23265 and nodejs/user-feedback#51 |
Ok thanks you :) |
Requiring n-api modules in worker threads are supported AFAIK, tested on 10.15.1 and 11.9.0. Could you require the native module in main module? i.e without worker threads. |
4 tasks
addaleax
added a commit
that referenced
this issue
Feb 25, 2019
Allow loading add-ons from multiple Node.js instances if they are declared context-aware; in particular, this applies to N-API addons. Also, plug a memory leak that occurred when registering N-API addons. Refs: #23319 PR-URL: #26175 Fixes: #21481 Fixes: #21783 Fixes: #25662 Fixes: #20239 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
rvagg
pushed a commit
that referenced
this issue
Feb 28, 2019
Allow loading add-ons from multiple Node.js instances if they are declared context-aware; in particular, this applies to N-API addons. Also, plug a memory leak that occurred when registering N-API addons. Refs: #23319 PR-URL: #26175 Fixes: #21481 Fixes: #21783 Fixes: #25662 Fixes: #20239 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi everyone !
I'm facing a problem using worker thread API and native addon (c++).
My purpose is to call native addon functions in a seperate thread to avoid blocking the main thread.
To do that i need to require my addon in each thread i'm creating but i have the error :
Error: Module did not self-register.
As it's written in the documentation, the worker_thread API doesn't support native addon for now..
My question is do you have an estimation date of this feature ?
Thanks.
Node: 10.15
Addon: c++ / node-gyp / node_addon_api
The text was updated successfully, but these errors were encountered: