electron-workers
Advanced tools
Comparing version 1.3.1 to 1.4.0
@@ -127,2 +127,3 @@ | ||
stdio: _this.options.stdio, | ||
killSignal: _this.options.killSignal, | ||
electronArgs: _this.options.electronArgs, | ||
@@ -129,0 +130,0 @@ pathToElectron: _this.options.pathToElectron, |
@@ -244,3 +244,8 @@ 'use strict'; | ||
this._childProcess.kill('SIGTERM'); | ||
if (this.options.killSignal) { | ||
this._childProcess.kill(this.options.killSignal); | ||
} else { | ||
this._childProcess.kill(); | ||
} | ||
this._childProcess = undefined; | ||
@@ -247,0 +252,0 @@ } |
{ | ||
"name": "electron-workers", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "Run electron scripts in managed workers", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -58,2 +58,3 @@ # electron-workers | ||
console.log(JSON.stringify(data)); // { someData: 'someData' } | ||
electronWorkers.kill(); // kill all workers explicitly | ||
}); | ||
@@ -72,2 +73,3 @@ }); | ||
`stdio` pass custom stdio option to worker's child process. see [node.js documentation](https://nodejs.org/api/child_process.html#child_process_options_stdio) for details<br/> | ||
`killSignal` String - when calling `electronWorkers.kill()` this value will be used to [kill the child process](https://nodejs.org/api/child_process.html#child_process_child_kill_signal) attached to the worker. see node.js docs for [more info on signal events](https://nodejs.org/api/process.html#process_signal_events)<br /> | ||
`timeout` - execution timeout in ms<br/> | ||
@@ -74,0 +76,0 @@ `numberOfWorkers` - number of electron instances, by default it will be the number of cores in the machine<br/> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29525
466
95