Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Nov 9, 2023
1 parent 452d6f5 commit 7f4cab2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/native/binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ if (binding == undefined) {
}

import crt_native from "./binding"
/** As Electron would shutdown the node process on exit, and eventually causing "segfault" on threadsafe function operation.
* We disable the node threadsafe functions on node process exit to prevent the segfault */
/** Electron will shutdown the node process on exit, which causes the threadsafe function to segfault. To prevent
* the segfault we disable the threadsafe function on node process exit. */
if (process.versions.hasOwnProperty('electron')) {
process.on('exit', function () {
crt_native.disable_threadsafe_function();
Expand All @@ -85,4 +85,4 @@ if (process.versions.hasOwnProperty('electron')) {


export default binding;
export { CRuntimeType , cRuntime };
export { CRuntimeType, cRuntime };

0 comments on commit 7f4cab2

Please sign in to comment.