X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fthread%2Ffixed.ts;h=c4256bf3b2213d8d7a6a60d7df8a95447576b888;hb=refs%2Ftags%2Fv3.1.15;hp=f7557a57c3640981b827daa00d4fe298715c836d;hpb=d087803425ae5b3577028029dd1d2dae67d7f63b;p=poolifier.git diff --git a/src/pools/thread/fixed.ts b/src/pools/thread/fixed.ts index f7557a57..c4256bf3 100644 --- a/src/pools/thread/fixed.ts +++ b/src/pools/thread/fixed.ts @@ -1,14 +1,13 @@ import { - type MessageChannel, type MessagePort, type TransferListItem, type Worker, isMainThread } from 'node:worker_threads' -import type { MessageValue } from '../../utility-types' -import { AbstractPool } from '../abstract-pool' -import { type PoolOptions, type PoolType, PoolTypes } from '../pool' -import { type WorkerType, WorkerTypes } from '../worker' +import type { MessageValue } from '../../utility-types.js' +import { AbstractPool } from '../abstract-pool.js' +import { type PoolOptions, type PoolType, PoolTypes } from '../pool.js' +import { type WorkerType, WorkerTypes } from '../worker.js' /** * Options for a poolifier thread pool. @@ -63,8 +62,8 @@ export class FixedThreadPool< /** @inheritDoc */ protected sendStartupMessageToWorker (workerNodeKey: number): void { const workerNode = this.workerNodes[workerNodeKey] - const port2: MessagePort = (workerNode.messageChannel as MessageChannel) - .port2 + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const port2: MessagePort = workerNode.messageChannel!.port2 workerNode.worker.postMessage( { ready: false, @@ -114,7 +113,9 @@ export class FixedThreadPool< } /** @inheritDoc */ - protected checkAndEmitDynamicWorkerCreationEvents (): void {} + protected checkAndEmitDynamicWorkerCreationEvents (): void { + /* noop */ + } /** @inheritDoc */ protected get type (): PoolType {