https://github.com/josdejong/workerpool
- Fix terminating a pool throwing an error when used in the browser.
Regression introduced in
v6.1.3
.
- Fix #147: disregard messages from terminated workers. Thanks @hhprogram and @Madgvox.
- Fix #253, add
./src
again in the published npm package, reverting the change inv6.1.1
(see also #243).
- Remove redundant
./src
folder from the published npm package, see #243. Thanks @Nytelife26.
- Implemented support for sending events from the worker to the main thread, see #51, #227. Thanks @Akryum.
- Fix an issue in Node.js nightly, see #230. Thanks @aduh95.
- Fix #232
workerpool
not working on IE 10.
- Make evaluation of offloaded functions a bit more secure by using
new Function
instead ofeval
. Thanks @tjenkinson.
- Fixes and more robustness in terminating workers. Thanks @boneskull.
- Fix #32, #175: the promise returned by
Pool.terminate()
now waits until subprocesses are dead before resolving. Thanks @boneskull.
- Removed examples from the npm package. Thanks @madbence.
WARNING: the library entry points are changed and new source maps are added. This may have impact on your project depending on your setup.
- Created separate library entry points in package.json for node.js and browser. Thanks @boneskull.
- Generated source maps for both minified and non-minified bundles.
- Removed deprecation warnings for
options.nodeWorker
(renamed tooptions.workerType
) andpool.clear()
(renamed topool.terminate()
).
- Fixed #121:
isMainThread
not working when usingworker_threads
. - Drop official support for node.js 8 (end of life).
- Fixed library not working in the browser. See #106.
- Fixed environment detection in browser. See #106. Thanks @acgrid.
- Fixed #96: WorkerPool not cancelling any pending tasks on termination.
- Deprecated option
nodeWorker
and created a new, more extensive optionworkerType
giving full control over the selected type of worker. Added new option'web'
to enforce use a Web Worker. See #85, #74. - In a node.js environment, the default
workerType
is changed from'process'
to'thread'
. See #85, #50. - Improved detection of environment (
browser
ornode
), fixing wrong detection in a Jest test environment. See #85.
- Pass argument
--max-old-space-size
to child processes. Thanks @patte. - Removed redundant dependencies, upgraded all devDependencies.
- Fixed Webpack issues of missing modules
child_process
andworker_threads
. See #43. - Bundled library changed due to the upgrade to Webpack 4. This could possibly lead to breaking changes.
- Implemented new option
maxQueueSize
. Thanks @colomboe. - Fixed exiting workers when the parent process is killed. Thanks @RogerKang.
- Fixed #81: Option
minWorkers: 'max'
not using the configuredmaxWorkers
. - Fixed not passing
nodeWorker
to workers initialized when creating a pool. Thanks @spacelan. - Internal restructure of the code: moved from
lib
tosrc
.
-
Improved error message when a node.js worker unexpectedly exits (see #58). Thanks @stefanpenner.
-
Allocate debug ports safely, this fixes an issue cause workers to exit unexpectedly if more then one worker pool is active, and the process is started with a debugger (
node debug
ornode --inspect
). Thanks @stefanpenner.
- Fix option
nodeWorker: 'auto'
not using worker threads when available. Thanks @stefanpenner.
- Implemented support for using
worker_threads
in Node.js, via the new optionnodeWorker: 'thread'
. Thanks @stefanpenner.
- Enable usage in ES6 Webpack projects.
- Dropped support for AMD module system.
- Fixed space in license field in
package.json
. Thanks @sagotsky.
- Add licence field to
package.json
. Thanks @greyd.
- Fixed bug where tasks that are cancelled in a Pool's queue causes following tasks to not run. Thanks @greemo.
- New method
Pool.terminate(force, timeout)
which will replacePool.clear(force)
. Thanks @jimsugg. - Fixed issue with never terminating zombie child processes. Thanks @jimsugg.
- Fixed a debug issue: look for
--inspect
within argument strings, instead of exact match. Thanks @jimsugg.
- Updated all examples to neatly include
.catch(...)
callbacks.
- Fixed #25: timer of a timeout starting when the task is created instead of when the task is started. Thanks @eclipsesk for input.
- Fixed #2 and #19: support for debugging child processes. Thanks @tptee.
- Implemented #18: method
pool.stats()
.
- Implemented support for registering the workers methods asynchronously. This enables asynchronous initialization of workers, for example when using AMD modules. Thanks @natlibfi-arlehiko.
- Implemented environment variables
platform
,isMainThread
, andcpus
. Thanks @natlibfi-arlehiko. - Implemented option
minWorkers
. Thanks @sergei202.
- Replaced conversion of Error-objecting using serializerr to custom implementation to prevent issues with serializing/deserializing functions. This conversion implementation loses the prototype object which means that e.g. 'TypeError' will become just 'Error' in the main code. See #8. Thanks @natlibfi-arlehiko.
- Fix for a bug in PhantomJS (see #7). Thanks @natlibfi-arlehiko.
- Determine
maxWorkers
as the number of CPU's minus one in browsers too. See #6.
- Fixed #5 error when loading via AMD or bundling using Webpack.
- Implemented serializing errors with stacktrace. Thanks @mujx.
- Added an error message when wrongly calling
pool.proxy
. - Fixed function
worker.pool
not accepting both a script and options. See #1. Thanks @freund17.
- Merged function
Pool.run
intoPool.exec
, simplifying the API.
- Implemented support for cancelling running tasks.
- Implemented support for cancelling running tasks after a timeout.
- Implemented support for both node.js and the browser.
- Implemented offloading functions.
- Implemented worker proxy.
- Added docs and examples.
- Module name registered at npm.