X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2Ftask-functions.ts;h=2fd951fb2ac03d71b820a1673561630f0c9d7736;hb=3a5027122ca6401ae1d755843b20f714c61e3240;hp=0b3083c3aed6ca892af39070734c1562648f69af;hpb=937d524da3a5cce4795b85ddd1c430f0d184f731;p=poolifier.git diff --git a/src/worker/task-functions.ts b/src/worker/task-functions.ts index 0b3083c3..2fd951fb 100644 --- a/src/worker/task-functions.ts +++ b/src/worker/task-functions.ts @@ -2,10 +2,8 @@ import type { WorkerChoiceStrategy } from '../pools/selection-strategies/selecti /** * Task synchronous function that can be executed. - * * @param data - Data sent to the worker. * @returns Execution response. - * * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. * @typeParam Response - Type of execution response. This can only be structured-cloneable data. */ @@ -16,10 +14,8 @@ export type TaskSyncFunction = ( /** * Task asynchronous function that can be executed. * This function must return a promise. - * * @param data - Data sent to the worker. * @returns Execution response promise. - * * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. * @typeParam Response - Type of execution response. This can only be structured-cloneable data. */ @@ -30,7 +26,6 @@ export type TaskAsyncFunction = ( /** * Task function that can be executed. * This function can be synchronous or asynchronous. - * * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. * @typeParam Response - Type of execution response. This can only be structured-cloneable data. */ @@ -40,7 +35,6 @@ export type TaskFunction = /** * Task function object. - * * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. * @typeParam Response - Type of execution response. This can only be structured-cloneable data. */ @@ -63,13 +57,12 @@ export interface TaskFunctionObject { * Tasks functions that can be executed. * The key is the name of the task function or task function object. * The value is the task function or task function object. - * * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. * @typeParam Response - Type of execution response. This can only be structured-cloneable data. */ export type TaskFunctions = Record< -string, -TaskFunction | TaskFunctionObject + string, + TaskFunction | TaskFunctionObject > /**