summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/worker-farm/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/worker-farm/README.md')
-rw-r--r--deps/npm/node_modules/worker-farm/README.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/deps/npm/node_modules/worker-farm/README.md b/deps/npm/node_modules/worker-farm/README.md
index 87ee4b61b5..982b37cb5d 100644
--- a/deps/npm/node_modules/worker-farm/README.md
+++ b/deps/npm/node_modules/worker-farm/README.md
@@ -103,7 +103,8 @@ If you don't provide an `options` object then the following defaults will be use
```js
{
- maxCallsPerWorker : Infinity
+ workerOptions : {}
+ , maxCallsPerWorker : Infinity
, maxConcurrentWorkers : require('os').cpus().length
, maxConcurrentCallsPerWorker : 10
, maxConcurrentCalls : Infinity
@@ -113,6 +114,8 @@ If you don't provide an `options` object then the following defaults will be use
}
```
+ * **<code>workerOptions</code>** allows you to customize all the parameters passed to child nodes. This object supports [all possible options of `child_process.fork`](https://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options). The default options passed are the parent `execArgv`, `cwd` and `env`. Any (or all) of them can be overridden, and others can be added as well.
+
* **<code>maxCallsPerWorker</code>** allows you to control the lifespan of your child processes. A positive number will indicate that you only want each child to accept that many calls before it is terminated. This may be useful if you need to control memory leaks or similar in child processes.
* **<code>maxConcurrentWorkers</code>** will set the number of child processes to maintain concurrently. By default it is set to the number of CPUs available on the current system, but it can be any reasonable number, including `1`.