X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2FmultiFunctionExample.js;h=213736ea037899024da9e9aab20213ebf518de40;hb=8f4878b72252b92146ae968357450df53cfa8fa7;hp=6edc2bb7aaaa80b2d7ade610a09860785919d62d;hpb=1086026a2542abdcd0c5569d9afbfb8c2e628276;p=poolifier.git diff --git a/examples/multiFunctionExample.js b/examples/multiFunctionExample.js index 6edc2bb7..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(pool), 3000) +setTimeout(pool.destroy(), 3000)