X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2FmultiFunctionExample.js;h=213736ea037899024da9e9aab20213ebf518de40;hb=f1c0693012b2ec60fe1a0cbf457015b3f874e96f;hp=93d4e78b3d0465b35b823fd18dc2cbc203c66e31;hpb=5c5a1fb79906f18560012263239e7bd611ee8d2b;p=poolifier.git diff --git a/examples/multiFunctionExample.js b/examples/multiFunctionExample.js index 93d4e78b..213736ea 100644 --- a/examples/multiFunctionExample.js +++ b/examples/multiFunctionExample.js @@ -5,12 +5,12 @@ const pool = new FixedThreadPool(15, './multiFunctionWorker.js', { }) pool - .execute({ functionName: 'fn0', input: 'hello' }) + .execute({ text: 'hello' }, 'fn0') .then(res => console.log(res)) .catch(err => console.error(err)) pool - .execute({ functionName: 'fn1', input: 'multiple functions' }) + .execute({ text: 'multiple functions' }, 'fn1') .then(res => console.log(res)) .catch(err => console.error(err)) -setTimeout(pool.destroy.bind(pool), 3000) +setTimeout(pool.destroy(), 3000)