Installation
Requirements
COMPATIBILITY NOTE
Requires node 10.5+ to use the worker thread API. You must run node with the --experimental-worker
flag enabled.
Note that this is node
only (ie. not available in the browser - use web workers instead).
When running code, the experimental workers feature must be enabled. This can be enabled by either:
Passing the --experimental-workers
flag
node --experimental-worker <script>
Or by setting the environment variable
NODE_OPTIONS=--experimental-worker node <script>
Downloading
Versions of node-threadpool
are published to npm.
If using npm
, add the dependency via
npm i node-threadpool
Or if using yarn
yarn add node-threadpool