Skip to content
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

fix: NAN_MODULE_WORKER_ENABLED #204

Closed
wants to merge 1 commit into from

Conversation

achille-roussel
Copy link

Fixes #203

I followed the recommended fix from nodejs/nan#844 which appears to address the issue in the reported test case and other programs I tested it in.

Let me know if you wish to see something changed.

@achille-roussel
Copy link
Author

Any updates?

@achille-roussel
Copy link
Author

Hello, would you have any updates to share on this issue?

@Y--
Copy link
Collaborator

Y-- commented Mar 12, 2021

Sorry for the late follow-up. Could you add a test for this?

@Prinzhorn
Copy link

Prinzhorn commented Apr 9, 2021

Making a module context aware might require cleanup using node::AddEnvironmentCleanupHook. An example can be seen here: https://github.com/CharlieHess/node-mac-notifier/pull/32/files
I just want to make sure if this lands it will work properly. I'll use node-expat in a worker thread and killing it shouldn't cause memory leaks or crashes or whatnot.

@achille-roussel
Copy link
Author

Hey, I have not needed this change (maintained a fork at first, but did not need it anymore either), so I probably won't be finishing this PR.

Thanks for the replies, hopefully it will be useful if someone else runs into a similar issue.

@XDean
Copy link

XDean commented Apr 8, 2022

@achille-roussel Why you don't need this change, did you find any workaround? I'm now suffering from the same issue.

@achille-roussel
Copy link
Author

We stopped using worker threads in our code so the limitation didn't apply to our case anymore.

@XDean
Copy link

XDean commented Apr 8, 2022

We stopped using worker threads in our code so the limitation didn't apply to our case anymore.

So how do you deal with long time work? Now I need the process some large xml files. If I don't use workers threads, How to avoid it block mian thread?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

node-expat cannot be imported in worker threads
4 participants