build(deps-dev): apply updates
[poolifier.git] / examples / multiFunctionExample.js
index 93d4e78b3d0465b35b823fd18dc2cbc203c66e31..213736ea037899024da9e9aab20213ebf518de40 100644 (file)
@@ -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)