Closed Ar4ics closed 5 years ago
The start
function is used to launch the Worker Pool, not to spawn a new worker thread.
To do that, you should use the job
function but only for inline workers, not for separated files.
I think the native API fits better for your case: https://nodejs.org/api/worker_threads.html#worker_threads_new_worker_filename_options
thanks
something like
await start({ maxWorkers: AVAILABLE_CPUS }, workerPath, workerData);