<h2 id="installation">Installation</h2>
```
-npm install @pioardi/node-thread-pool --save
+npm install poolifier --save
```
<h2 id="usage">Usage</h2>
```js
'use strict'
-const { ThreadWorker } = require('@pioardi/node-thread-pool')
+const { ThreadWorker } = require('poolifier')
function yourFunction (data) {
// this will be executed in the worker thread,
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('@pioardi/node-thread-pool')
+const { FixedThreadPool, DynamicThreadPool } = require('poolifier')
// a fixed thread pool
const pool = new FixedThreadPool(15,
<h2 id="contribute">Contribute</h2>
-See guidelines [CONTRIBUTING](./.github/CONTRIBUTING.md)
+See guidelines [CONTRIBUTING](CONTRIBUTING.md)
<h2 id="license">License</h2>
[MIT](./LICENSE)
-