Enhance tasks statistics
[poolifier.git] / tests / worker-files / thread / testWorker.js
1 'use strict'
2 const { ThreadWorker, KillBehaviors } = require('../../../lib/index')
3 const { isMainThread } = require('worker_threads')
4 const TestUtils = require('../../test-utils')
5
6 function test (data) {
7 TestUtils.jsonIntegerSerialization(100)
8 return isMainThread
9 }
10
11 module.exports = new ThreadWorker(test, {
12 maxInactiveTime: 500,
13 killBehavior: KillBehaviors.HARD
14 })