feat: expose worker type in pool information
[poolifier.git] / src / pools / thread / fixed.ts
index 9939a04b9e497f5e78a84396493db7819f837508..cc35f0f971abdb9d1d808e57298a600466c66c73 100644 (file)
@@ -6,7 +6,13 @@ import {
 } from 'node:worker_threads'
 import type { Draft, MessageValue } from '../../utility-types'
 import { AbstractPool } from '../abstract-pool'
-import { type PoolOptions, type PoolType, PoolTypes } from '../pool'
+import {
+  type PoolOptions,
+  type PoolType,
+  PoolTypes,
+  type WorkerType,
+  WorkerTypes
+} from '../pool'
 
 /**
  * A thread worker with message channels for communication between main thread and thread worker.
@@ -95,6 +101,11 @@ export class FixedThreadPool<
     return PoolTypes.fixed
   }
 
+  /** @inheritDoc */
+  protected get worker (): WorkerType {
+    return WorkerTypes.thread
+  }
+
   /** @inheritDoc */
   protected get minSize (): number {
     return this.numberOfWorkers