X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=README.md;h=ed9df457b3f6227465ece3458a7e5342a0d2adf8;hb=0289646090c766a451aab11e7ab67a65f07221e4;hp=0b8b03073db2bf1ea03d74d1b2810a101ab3848e;hpb=eea03e6e75ec30d351a8988edb91127c577e4d36;p=poolifier.git diff --git a/README.md b/README.md index 0b8b0307..ed9df457 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ You can implement a worker-threads worker in a simple way by extending the class 'use strict' const { ThreadWorker } = require('poolifier') -function yourFunction(data) { +function yourFunction (data) { // this will be executed in the worker thread, // the data will be received by using the execute method return { ok: 1 } @@ -137,6 +137,8 @@ You can do the same with the classes ClusterWorker, FixedClusterPool and Dynamic **See examples folder for more details (in particular if you want to use a pool for [multiple functions](./examples/multiFunctionExample.js)).** **Now TypeScript is also supported, find how to use it into the example folder**. +Remember that workers can only send and receive serializable data. + ## Node versions You can use node versions 12.x, 13.x, 14.x