feat: add 'full' event on dynamic pool emitter
[poolifier.git] / README.md
index 1248db3f814f1dc273841b77d9171a7d0893940d..dc956759aef4cfa76ae4a409e4a4cd0a1fa1dd2c 100644 (file)
--- a/README.md
+++ b/README.md
@@ -120,11 +120,14 @@ const pool = new FixedThreadPool(15,
   './yourWorker.js',
   { errorHandler: (e) => console.error(e), onlineHandler: () => console.log('worker is online') })
 
+pool.emitter.on('busy', () => console.log('Pool is busy'))
+
 // or a dynamic worker-threads pool
 const pool = new DynamicThreadPool(10, 100,
   './yourWorker.js',
   { errorHandler: (e) => console.error(e), onlineHandler: () => console.log('worker is online') })
 
+pool.emitter.on('full', () => console.log('Pool is full'))
 pool.emitter.on('busy', () => console.log('Pool is busy'))
 
 // the execute method signature is the same for both implementations,