-
Notifications
You must be signed in to change notification settings - Fork 27
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 Segfault on Electron Exit #501
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per convo, check to see if the rw lock could be put on the module data rather than a static global. We also want to run our full test suite in a CI environment where each test gets run as a standalone electron app, but that can wait for a separate task, since we've partitioned the callback cutoff away from standard node execution.
Though it is possible to put the rw lock on module data, I didn't find a good way to retrieve the module data when we do threadsafe function operations. One possible solution is to make the whole module data a global static, while I feel it was meaningless to do so... |
Issue #, if available:
Description of changes:
As Electron would shutdown the node process on exit, and eventually causing "segfault" on threadsafe function operation. We now disable the node threadsafe functions on node process exit to prevent the segfault.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.