Closed justinvdm closed 4 years ago
Adds an invokeWorker option to allow configuring how workers are invoked.
invokeWorker
Reason I'm needing this is to provide additional arguments to the worker function, though accepting a wrapper function like this gives us flexibility for other use cases too:
new FileProcessor(pattern, workerPath, { invokeWorker(worker, filePath, callback) { worker(filePath, arg2, arg3, callback); } });
Potentially solves #11
:tada: This PR is included in version 3.1.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Adds an
invokeWorker
option to allow configuring how workers are invoked.Reason I'm needing this is to provide additional arguments to the worker function, though accepting a wrapper function like this gives us flexibility for other use cases too: