X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fapi.md;h=513f62c53a450dc6279e7807fcbd855fc63b525a;hb=31a42de7d691911759e12a673e5a2153f5558ed8;hp=28e6aad2c3b56bf529890aad889c9029e4b69777;hpb=152e87a8c57c8cbd3a3b437106bcc79c30fcc720;p=poolifier.git diff --git a/docs/api.md b/docs/api.md index 28e6aad2..513f62c5 100644 --- a/docs/api.md +++ b/docs/api.md @@ -45,6 +45,14 @@ This method is available on both pool implementations and returns a promise with the task function execution response. +### `pool.mapExecute(data, name, transferList)` + +`data` Iterable objects that you want to pass to your worker task function implementation. +`name` (optional) A string with the task function name that you want to execute on the worker. Default: `'default'` +`transferList` (optional) An array of transferable objects that you want to transfer to your [`ThreadWorker`](#class-yourworker-extends-threadworkerclusterworker) worker implementation. + +This method is available on both pool implementations and returns a promise with the task function execution responses array. + ### `pool.start()` This method is available on both pool implementations and will start the minimum number of workers.