X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2Fworker-functions.ts;h=9232e58f9e9b4b9000124621e16f083af07c154d;hb=23a6c28d3cc6edb778653a4d9d9a4d36f9a961c3;hp=28b9ed5446b5525c6904c1ed7a3a9916064f9545;hpb=b6b3245344bd453ea91fa3d74acd5145f70d84fd;p=poolifier.git diff --git a/src/worker/worker-functions.ts b/src/worker/worker-functions.ts index 28b9ed54..9232e58f 100644 --- a/src/worker/worker-functions.ts +++ b/src/worker/worker-functions.ts @@ -1,8 +1,8 @@ /** * Worker synchronous function that can be executed. * - * @typeParam Data - Type of data sent to the worker. This can only be serializable data. - * @typeParam Response - Type of execution response. This can only be serializable data. + * @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 WorkerSyncFunction = ( data?: Data @@ -12,8 +12,8 @@ export type WorkerSyncFunction = ( * Worker asynchronous function that can be executed. * This function must return a promise. * - * @typeParam Data - Type of data sent to the worker. This can only be serializable data. - * @typeParam Response - Type of execution response. This can only be serializable data. + * @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 WorkerAsyncFunction = ( data?: Data @@ -23,8 +23,8 @@ export type WorkerAsyncFunction = ( * Worker 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 serializable data. - * @typeParam Response - Type of execution response. This can only be serializable data. + * @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 WorkerFunction = | WorkerSyncFunction @@ -36,8 +36,8 @@ export type WorkerFunction = * The key is the name of the function. * The value is the function itself. * - * @typeParam Data - Type of data sent to the worker. This can only be serializable data. - * @typeParam Response - Type of execution response. This can only be serializable data. + * @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,