-import type { ThreadPoolOptions } from 'poolifier'
+import type { Worker } from 'worker_threads'
+import type { PoolOptions } from 'poolifier'
-export interface ClusterWorkerData extends ThreadPoolOptions {
+export interface ClusterWorkerData extends PoolOptions<Worker> {
port: number
workerFile: string
minWorkers?: number
-import type { ThreadPoolOptions } from 'poolifier'
+import type { Worker } from 'worker_threads'
+import type { PoolOptions } from 'poolifier'
export interface ClusterWorkerData extends FastifyPoolifierOptions {
port: number
data: T
}
-export interface FastifyPoolifierOptions extends ThreadPoolOptions {
+export interface FastifyPoolifierOptions extends PoolOptions<Worker> {
workerFile: string
minWorkers?: number
maxWorkers?: number
-import type { ThreadPoolOptions } from 'poolifier'
+import type { Worker } from 'worker_threads'
+import type { PoolOptions } from 'poolifier'
export interface BodyPayload {
number?: number
body: T
}
-export interface FastifyPoolifierOptions extends ThreadPoolOptions {
+export interface FastifyPoolifierOptions extends PoolOptions<Worker> {
workerFile: string
minWorkers?: number
maxWorkers?: number
-import type { ThreadPoolOptions } from 'poolifier'
+import type { Worker } from 'worker_threads'
+import type { PoolOptions } from 'poolifier'
export enum MessageType {
echo = 'echo',
number?: number
}
-export interface ClusterWorkerData extends ThreadPoolOptions {
+export interface ClusterWorkerData extends PoolOptions<Worker> {
port: number
workerFile: string
minWorkers?: number