Improvements based on https://github.com/pioardi/poolifier/issues/6
[poolifier.git] / README.MD
index 283520afd69a5a4dfb7debad33c95a647be8a2f5..7b57162a1b29b28efb9951f54a950f4a80b38c70 100644 (file)
--- a/README.MD
+++ b/README.MD
@@ -33,7 +33,7 @@ You have to implement your worker extending the ThreadWorker class<br>
 <h2 id="installation">Installation</h2>
 
 ```
-npm install node-thread-pool --save
+npm install poolifier --save
 ```
 <h2 id="usage">Usage</h2>
 
@@ -41,7 +41,7 @@ You can implement a worker in a simple way , extending the class ThreadWorker :
 
 ```js
 'use strict'
-const { ThreadWorker } = require('node-pool')
+const { ThreadWorker } = require('poolifier')
 
 function yourFunction (data) {
   // this will be executed in the worker thread,
@@ -49,19 +49,14 @@ function yourFunction (data) {
   return { ok: 1 }
 }
 
-class MyWorker extends ThreadWorker {
-  constructor () {
-    super(yourFunction, { maxInactiveTime: 1000 * 60})
-  }
-}
-module.exports = new MyWorker()
+module.exports = new ThreadWorker(yourFunction, { maxInactiveTime: 60000 })
 ```
 
-Instantiate your pool based on your needed : 
+Instantiate your pool based on your needed :
 
 ```js
 'use strict'
-const { FixedThreadPool, DynamicThreadPool } = require('node-pool')
+const { FixedThreadPool, DynamicThreadPool } = require('poolifier')
 
 // a fixed thread pool
 const pool = new FixedThreadPool(15,
@@ -131,10 +126,9 @@ But in general , <strong>always profile your application </strong>
 
 <h2 id="contribute">Contribute</h2>
 
-See guidelines [CONTRIBUTING](./.github/CONTRIBUTING.md)
+See guidelines [CONTRIBUTING](CONTRIBUTING.md)
 
 
 <h2 id="license">License</h2>
 
 [MIT](./LICENSE)
-