Add eslint-plugin-jsdoc (#142)
[poolifier.git] / examples / multifunctionWorker.js
index 87edd57d05585ca8da37d9a14e15a2a6472e4cc5..8a1809ac7c25e81e3e9f697ce98a0b5748bd9c6f 100644 (file)
@@ -1,5 +1,5 @@
 'use strict'
-const { ThreadWorker } = require('../lib/workers')
+const { ThreadWorker } = require('poolifier')
 
 function yourFunction (data) {
   if (data.fname === 'fn0') {
@@ -11,9 +11,4 @@ function yourFunction (data) {
   }
 }
 
-class MyWorker extends ThreadWorker {
-  constructor () {
-    super(yourFunction)
-  }
-}
-module.exports = new MyWorker()
+module.exports = new ThreadWorker(yourFunction)