You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was getting an error (Module did not self-register) when while running this package inside a Worker thread, I have fixed it by changing:
NODE_MODULE(tulind, Init)
to
NODE_MODULE_INIT()
{
Init(exports);
}
on the tulind.cpp file, then rebuilding with node-pre-gyp install --build-from-source
I'm still testing, but it seems to be working fine.
I didn't make a pull request because I don't want to mess up your code with my linters, but It would be nice to have this change on the main repo, in case anybody is having the same issue.
The text was updated successfully, but these errors were encountered:
jeremyjs
added a commit
to jeremyjs/tulipnode
that referenced
this issue
Oct 25, 2019
Tests would need to be added to ensure cleanup occurs and that no objects are accessed across threads. "...any global static data stored in the addon must be properly protected, and must not contain any persistent references to JavaScript objects."
I don't have the bandwidth to add this now, but I'd really like to use worker threads for my use case, so I might revisit this at a later time if no one else picks it up.
For now, it does seem like your patch allows the library to be used inside workers (I was able to use it successfully), but could possibly cause memory leaks or crashes due to cross-thread object usage.
Hi, I was getting an error (Module did not self-register) when while running this package inside a Worker thread, I have fixed it by changing:
to
on the
tulind.cpp
file, then rebuilding withnode-pre-gyp install --build-from-source
I'm still testing, but it seems to be working fine.
I didn't make a pull request because I don't want to mess up your code with my linters, but It would be nice to have this change on the main repo, in case anybody is having the same issue.
The text was updated successfully, but these errors were encountered: