super(type)
this.checkWorkerOptions(this.opts)
this.checkTaskFunctions(taskFunctions)
- if (!this.isMain) {
+ if (
+ !this.isMain &&
+ (this.opts.maxInactiveTime ?? DEFAULT_MAX_INACTIVE_TIME) > 0
+ ) {
this.lastTaskTimestamp = performance.now()
this.aliveInterval = setInterval(
this.checkAlive.bind(this),