Closed yoonasy closed 3 years ago
node: v12.21.0
npm: 7.21.1
const workerpool = require('workerpool');
const pool = workerpool.pool();
pool.exec(() => {}, []))
Got an error
You can try to configure { workerType: 'process' }
, looks like your version of nodejs doesn't support worker theads.
@josdejong
Thank you for your answer, but it still doesn't work.
The option workerType
needs to be passed when creating pool
instead of when calling pool.exec
, see docs: https://github.com/josdejong/workerpool#pool
@josdejong Thank you very much.