docs: update benchmarks vs. external pools
[poolifier.git] / examples / multiFunctionExample.js
index 213736ea037899024da9e9aab20213ebf518de40..055f143fdafae8ee1eb82e65f161d0f69f6b2e4e 100644 (file)
@@ -1,16 +1,16 @@
 const { FixedThreadPool } = require('poolifier')
 const pool = new FixedThreadPool(15, './multiFunctionWorker.js', {
   errorHandler: e => console.error(e),
-  onlineHandler: () => console.log('worker is online')
+  onlineHandler: () => console.info('worker is online')
 })
 
 pool
   .execute({ text: 'hello' }, 'fn0')
-  .then(res => console.log(res))
+  .then(res => console.info(res))
   .catch(err => console.error(err))
 pool
   .execute({ text: 'multiple functions' }, 'fn1')
-  .then(res => console.log(res))
+  .then(res => console.info(res))
   .catch(err => console.error(err))
 
 setTimeout(pool.destroy(), 3000)