X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fthread%2Fdynamic.ts;h=b6d41e9ef9f7ff92cecf89e068c6493bafe696e3;hb=e8b3a5abad7d3ae4fa836ab0b76d54c1efd146e9;hp=8cdb0d5c6328d318798d4465f1a5a07aeb338c2a;hpb=b4213b7fc45201c5a38f2615289c569b679a15b7;p=poolifier.git diff --git a/src/pools/thread/dynamic.ts b/src/pools/thread/dynamic.ts index 8cdb0d5c..b6d41e9e 100644 --- a/src/pools/thread/dynamic.ts +++ b/src/pools/thread/dynamic.ts @@ -1,5 +1,5 @@ -import { type PoolOptions, type PoolType, PoolTypes } from '../pool' -import { FixedThreadPool, type ThreadWorkerWithMessageChannel } from './fixed' +import { type PoolType, PoolTypes } from '../pool' +import { FixedThreadPool, type ThreadPoolOptions } from './fixed' /** * A thread pool with a dynamic number of threads, but a guaranteed minimum number of threads. @@ -28,7 +28,7 @@ export class DynamicThreadPool< min: number, protected readonly max: number, filePath: string, - opts: PoolOptions = {} + opts: ThreadPoolOptions = {} ) { super(min, filePath, opts) } @@ -43,11 +43,6 @@ export class DynamicThreadPool< return this.max } - /** @inheritDoc */ - protected get full (): boolean { - return this.workerNodes.length >= this.max - } - /** @inheritDoc */ protected get busy (): boolean { return this.full && this.internalBusy()