perf: remove unneeded class indirection for dynamic pool in worker
[poolifier.git] / tests / worker-files / thread / errorWorker.js
index e9f20ab8e5101120d7f51459bf338676208f404f..c33dc1f0eb5e7c454a8ae355fe0c997761c32c56 100644 (file)
@@ -1,11 +1,12 @@
 'use strict'
 const { ThreadWorker, KillBehaviors } = require('../../../lib/index')
 
-function error (data) {
-  throw new Error(data)
+function error () {
+  throw new Error('Error Message from ThreadWorker')
 }
 
 module.exports = new ThreadWorker(error, {
   maxInactiveTime: 500,
+  async: false,
   killBehavior: KillBehaviors.HARD
 })