-
Notifications
You must be signed in to change notification settings - Fork 465
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
Support for Asynchronous Thread-safe Function Calls #312
Comments
I'll take this issue if there is no one actively working on this. |
Hello, |
Ah, I missed this.. I'm on a trip now. I'll finish to implement this until next week. |
How is the process going? It would be nice to get examples. |
@romandev I tought you're working on wrapping napi_threadsafe_function calls? I did not do that. I was working on a util method for making node calls from second thread easier. |
@DaAitch Okay, thank you for explanation. I was lacking in understanding. I'll send a PR. Please review it when you have a spare time. |
@romandev @mhdawson @gabrielschulhof I think this needs some clarification now. Also in last Team meeting it was said, that I'm working on this which is not correct 😁 . There is misunderstanding happening here. @romandev started working on a PR to land napi tsfn node-addon-api impl. I did not do that. I was working on an idea I started as WIP PR (#424), but which might never land. Only for the purpose to have some kind of documentation on things we tried out. The reason why it looks like I did the tsfn implemention for node-addon-api is simply because the So @romandev please go ahead with your PR on this. I think it would be good to land this soon because I'm also thinking that tsfn is a killer feature, so if you need help or want to hand it over please raise your hand. |
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function*. Fixes nodejs#312.
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. Fixes nodejs#312. [1] https://github.com/nodejs/node/tree/master/test/node-api/test_threadsafe_function
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. Fixes nodejs#312. [1] https://github.com/nodejs/node/tree/master/test/node-api/test_threadsafe_function
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. Fixes nodejs#312. [1] https://github.com/nodejs/node/tree/master/test/node-api/test_threadsafe_function
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. Fixes nodejs#312. [1] https://github.com/nodejs/node/tree/master/test/node-api/test_threadsafe_function
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. Fixes nodejs#312. [1] https://github.com/nodejs/node/tree/master/test/node-api/test_threadsafe_function
Is this ready for release ? |
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. Fixes nodejs#312. [1] https://github.com/nodejs/node/tree/master/test/node-api/test_threadsafe_function
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. Fixes nodejs#312. [1] https://github.com/nodejs/node/tree/master/test/node-api/test_threadsafe_function
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. Fixes nodejs#312. [1] https://github.com/nodejs/node/tree/master/test/node-api/test_threadsafe_function
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. Fixes nodejs#312. [1] https://github.com/nodejs/node/tree/master/test/node-api/test_threadsafe_function
@romandev Do you have an ETA on when this feature will be released? |
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. Fixes nodejs#312. [1] https://github.com/nodejs/node/tree/master/test/node-api/test_threadsafe_function
Implement ThreadSafeFunction class |
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. Fixes nodejs#312. [1] https://github.com/nodejs/node/tree/master/test/node-api/test_threadsafe_function
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. Fixes nodejs#312. [1] https://github.com/nodejs/node/tree/master/test/node-api/test_threadsafe_function
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. Fixes nodejs#312. [1] https://github.com/nodejs/node/tree/master/test/node-api/test_threadsafe_function
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. Fixes nodejs#312. [1] https://github.com/nodejs/node/tree/master/test/node-api/test_threadsafe_function
any plans on doing a release with this, now that the code and docs are merged? |
Hi @DuBistKomisch, |
@romandev Great with this API (!) but are there any examples for how to use the API ? |
@extmchristensen check out https://github.com/nodejs/node-addon-api/blob/master/doc/threadsafe_function.md#example |
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. [1] https://github.com/nodejs/node/tree/e800f9d/test/node-api/test_threadsafe_function PR-URL: nodejs/node-addon-api#442 Fixes: nodejs/node-addon-api#312 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. [1] https://github.com/nodejs/node/tree/e800f9d/test/node-api/test_threadsafe_function PR-URL: nodejs/node-addon-api#442 Fixes: nodejs/node-addon-api#312 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. [1] https://github.com/nodejs/node/tree/e800f9d/test/node-api/test_threadsafe_function PR-URL: nodejs/node-addon-api#442 Fixes: nodejs/node-addon-api#312 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
This PR is implementing ThreadSafeFunction class wraps napi_threadsafe_function features. FYI, the test files that included in this PR have come from Node.js repo[1]. They've been rewritten based on C++ and node-addon-api. [1] https://github.com/nodejs/node/tree/e800f9d/test/node-api/test_threadsafe_function PR-URL: nodejs/node-addon-api#442 Fixes: nodejs/node-addon-api#312 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Hello, Thank you for the effort to create and maintain the C++ wrappers for N-API. The wrappers make it very much easier to create native addons.
N-API added capability for additional threads to invoke JavaScript functions based on the processing completed by those threads. Is there any timeline/plan to add wrappers for the same?
https://nodejs.org/docs/latest-v10.x/api/n-api.html#n_api_asynchronous_thread_safe_function_calls
Thank you
The text was updated successfully, but these errors were encountered: