-
Notifications
You must be signed in to change notification settings - Fork 47
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
Module is not Context-Aware. Creates module registration error with node js worker threads #14
Comments
I've discovered this has to do with making the module Some more documentation: I'm attempting a fix but have not found any luck thus far. My C++ skills are very novice so this stuff is going over my head and I'm really just trying to emulate what others have done to migrate their modules (like here: https://github.com/schroffl/node-lzo/pull/11/files) |
@Ethan-Arrowood — I quickly looked at the linked commentary, and did some very minor edits, not sure if the macro use changes does anything at all for you, but please try it out. |
No follow up, so I'm closing. Re-open if the problem subsists. |
Update 12/2/18 -
This is context-aware issue with C++ addons. See this issue thread for more details and potential fixes: nodejs/node#21783
--
I'm trying to use this library with my multithreading (Node.js worker-threads). I am encountering this error message when I use
mmap-io
in both my main thread and worker thread. See the following code and error out in order to reproduce.script.js
worker.js
std.err (Ignore line numbers as I have removed some comments and extra console.log statements to simplify the code in this issue)
Once I remove
mmap-io
from myscript.js
the program runs as expect without errors (and the records are swapped in the file as intended by the logic inworker.js
). Could this have something to do with the read/write access on the"./build/Release/mmap-io.node"
file?The text was updated successfully, but these errors were encountered: