Skip to content

Commit

Permalink
chore: publish v9.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Jan 18, 2024
1 parent 772cd3a commit 37bd36b
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions HISTORY.md
Expand Up @@ -2,6 +2,12 @@
https://github.com/josdejong/workerpool


## 2024-01-18, version 9.1.0

- Support capturing the stdout/stderr streams from the workers (#425, #423).
Thanks @cpendery.


## 2023-12-22, version 9.0.4

- Improve the logic to detect the Node.js platform (#421). Thanks @tamuratak.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Expand Up @@ -186,7 +186,7 @@ Apache License
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright (C) 2014-2023 Jos de Jong wjosdejong@gmail.com
Copyright (C) 2014-2024 Jos de Jong wjosdejong@gmail.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -515,7 +515,7 @@ To see the coverage results, open the generated report in your browser:

## License

Copyright (C) 2014-2023 Jos de Jong <wjosdejong@gmail.com>
Copyright (C) 2014-2024 Jos de Jong <wjosdejong@gmail.com>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "workerpool",
"license": "Apache-2.0",
"version": "9.0.4",
"version": "9.1.0",
"description": "Offload tasks to a pool of workers on node.js and in the browser",
"homepage": "https://github.com/josdejong/workerpool",
"author": "Jos de Jong <wjosdejong@gmail.com> (https://github.com/josdejong)",
Expand Down
6 changes: 3 additions & 3 deletions src/types.js
Expand Up @@ -17,12 +17,12 @@
* - In case of `'web'`, a Web Worker will be used. Only available in a browser environment.
* - In case of `'process'`, `child_process` will be used. Only available in a node.js environment.
* - In case of `'thread'`, `worker_threads` will be used. If `worker_threads` are not available, an error is thrown. Only available in a node.js environment.
* @property {number} [workerTerminateTimeout] The timeout in milliseconds to wait for a worker to cleanup it's resources on termination before stopping it forcefully. Default value is `1000`.
* @property {number} [workerTerminateTimeout] The timeout in milliseconds to wait for a worker to clean up it's resources on termination before stopping it forcefully. Default value is `1000`.
* @property {string[]} [forkArgs] For `process` worker type. An array passed as `args` to [child_process.fork](https://nodejs.org/api/child_process.html#child_processforkmodulepath-args-options)
* @property {import('child_process').ForkOptions} [forkOpts] For `process` worker type. An object passed as `options` to [child_process.fork](https://nodejs.org/api/child_process.html#child_processforkmodulepath-args-options).
* @property {WorkerOptions} [workerOpts] For `web` worker type. An object passed to the [constructor of the web worker](https://html.spec.whatwg.org/multipage/workers.html#dom-worker). See [WorkerOptions specification](https://html.spec.whatwg.org/multipage/workers.html#workeroptions) for available options.
* @property {WorkerOptions} [workerOpts] For `web` worker type. An object passed to the [constructor of the web worker](https://html.spec.whatwg.org/multipage/workers.html#dom-worker). See [WorkerOptions specification](https://html.spec.whatwg.org/multipage/workers.html#workeroptions) for available options.
* @property {import('worker_threads').WorkerOptions} [workerThreadOpts] Object`. For `worker` worker type. An object passed to [worker_threads.options](https://nodejs.org/api/worker_threads.html#new-workerfilename-options).
* @property {boolean} [emitStdStreams] Emit stdout and stdout from worker under the `stdout` and `stderr` events. Not supported by `web` worker type.
* @property {boolean} [emitStdStreams] Capture stdout and stderr from the worker and emit them via the `stdout` and `stderr` events. Not supported by the `web` worker type.
* @property { (arg: WorkerArg) => WorkerArg | undefined } [onCreateWorker] A callback that is called whenever a worker is being created. It can be used to allocate resources for each worker for example. Optionally, this callback can return an object containing one or more of the `WorkerArg` properties. The provided properties will be used to override the Pool properties for the worker being created.
* @property { (arg: WorkerArg) => void } [onTerminateWorker] A callback that is called whenever a worker is being terminated. It can be used to release resources that might have been allocated for this specific worker. The callback is passed as argument an object as described for `onCreateWorker`, with each property sets with the value for the worker being terminated.
*/
Expand Down

0 comments on commit 37bd36b

Please sign in to comment.