-
Notifications
You must be signed in to change notification settings - Fork 459
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
threadsafe: RunInNodeThread #413
Comments
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made. |
We should keep this open, team will try to review so we can discuss in next weeks meeting. |
Discussed in the team meeting today. It seems useful, but might fit better in a supporting library and would be a good candidate if we had one that we used to provide wrapper type functions. Unfortunately we don't have that yet. |
We discussed again in todays meeting and the what we agreed:
Is one of those something that you'd be interested in? |
@mhdawson I think that's a good idea. I'll close this. |
Beside wrapping
napi_*_threadsafe
I'd also love to see aRunInNodeThread
implementation innode-addon-api
as an enabler for "concurrent processing" / multithreading and modern C++ with NAPI.As
napi_threadsafe..
API is not fire and forget, but creates objects etc., I wrapped everything in a class which must live on the heap, but threadsafe objects are created once and reused.The main idea is that we can run
RunInNodeThread
from any thread:What do you think?
The text was updated successfully, but these errors were encountered: