nodejs / node-addon-api Public
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
Thread-Safe Function wtih ArrayBuffer #1102
Comments
|
We discussed in the Node-api team meeting today and the first thought is that it might be running into a Out of Memory, allocating in a tight loop may mean that the GC cannot keep up. Have you tried using a longer time in Is the code in a repo or somewhere we could run? |
Thank you for your attention. |
|
If the thread keeps working after the Node.js instance terminates, you might be able to use a cleanup hook to abort the thread-safe function during Node.js shutdown. You're secondary thread will then handle the |
|
@blindson76 I am triaging this issue, |
|
@blindson76 I created a simplified version based on https://github.com/nodejs/node-addon-api/blob/main/doc/threadsafe_function.md , and this seems to work fine for me, |
|
js test file for the above is |
I think this is not same case with mine. In my version, thread-safe function used in a "Wrapped Object" instance method. In a standalone function everything works fine as a remember. |
|
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. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Hi,
I'm trying to some background task and send its results to JS with ArrayBuffer in thread-safe function. But after a while the node main thread terminates by own while worker thread continue working. I'v tried to put some traces to see what happens but couldn't find anything. Please anynody tell me what is wrong in there.
and it's output
The text was updated successfully, but these errors were encountered: