X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2FmultifunctionWorker.js;h=8a1809ac7c25e81e3e9f697ce98a0b5748bd9c6f;hb=583a27ce13d67cc33ded52f46fe1665c64a8fec7;hp=87edd57d05585ca8da37d9a14e15a2a6472e4cc5;hpb=a3c8691eb5bd772a43746fd5860d54a786463039;p=poolifier.git diff --git a/examples/multifunctionWorker.js b/examples/multifunctionWorker.js index 87edd57d..8a1809ac 100644 --- a/examples/multifunctionWorker.js +++ b/examples/multifunctionWorker.js @@ -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)