X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=README.md;h=e6d676ecdb28a27141de20c1ea08acfd4d064c7f;hb=0fc6cbb45e0571c5da4d2b523b7e55d9315d0aa5;hp=3ebb9b7cca227268674759371678851afec438e6;hpb=18fea9f10a9d1fd8bbbc4738284939868faa0db5;p=poolifier.git diff --git a/README.md b/README.md index 3ebb9b7c..e6d676ec 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,7 @@ const pool = new FixedThreadPool(availableParallelism(), './yourWorker.js', { onlineHandler: () => console.info('worker is online') }) +pool.emitter.on(PoolEvents.ready, () => console.info('Pool is ready')) pool.emitter.on(PoolEvents.busy, () => console.info('Pool is busy')) // or a dynamic worker-threads pool @@ -131,6 +132,7 @@ const pool = new DynamicThreadPool(Math.floor(availableParallelism() / 2), avail }) pool.emitter.on(PoolEvents.full, () => console.info('Pool is full')) +pool.emitter.on(PoolEvents.ready, () => console.info('Pool is ready')) pool.emitter.on(PoolEvents.busy, () => console.info('Pool is busy')) // the execute method signature is the same for both implementations,