X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fworker.ts;h=4c877bc8b1dcc58871a55cd70c87871d918c4596;hb=refs%2Ftags%2Fv2.7.4;hp=456bf785c74eff79cf45441be1c096633ce1bc11;hpb=f3a91bac2d5c34013f6394ebbe3576569b0cfcc0;p=poolifier.git diff --git a/src/pools/worker.ts b/src/pools/worker.ts index 456bf785..4c877bc8 100644 --- a/src/pools/worker.ts +++ b/src/pools/worker.ts @@ -144,7 +144,7 @@ export interface WorkerInfo { /** * Task function names. */ - taskFunctions?: string[] + taskFunctionNames?: string[] } /** @@ -172,7 +172,9 @@ export interface WorkerUsage { } /** - * Worker strategy data. + * Worker choice strategy data. + * + * @internal */ export interface StrategyData { virtualTaskEndTimestamp?: number @@ -235,7 +237,7 @@ export interface IWorkerNode { */ readonly usage: WorkerUsage /** - * Worker strategy data. + * Worker choice strategy data. * This is used to store data that is specific to the worker choice strategy. */ strategyData?: StrategyData @@ -313,4 +315,11 @@ export interface IWorkerNode { * @returns The task function worker usage statistics if the task function worker usage statistics are initialized, `undefined` otherwise. */ readonly getTaskFunctionWorkerUsage: (name: string) => WorkerUsage | undefined + /** + * Deletes task function worker usage statistics. + * + * @param name - The task function name. + * @returns `true` if the task function worker usage statistics were deleted, `false` otherwise. + */ + readonly deleteTaskFunctionWorkerUsage: (name: string) => boolean }