X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fpools%2Fthread%2Ffixed.ts;h=a61c10b2346c8a44c4094605dfe6aa25787b8f09;hb=deb85c12b77faf6974551cefcd9676e62a392086;hp=8ecf116cb6cc95eb385ee1ab96f7ab1b414b84f8;hpb=cefac5ba30860fee4cc7feab628d54bdb7601e08;p=poolifier.git diff --git a/src/pools/thread/fixed.ts b/src/pools/thread/fixed.ts index 8ecf116c..a61c10b2 100644 --- a/src/pools/thread/fixed.ts +++ b/src/pools/thread/fixed.ts @@ -1,5 +1,5 @@ import { isMainThread, MessageChannel, SHARE_ENV, Worker } from 'worker_threads' -import type { Draft, JSONValue, MessageValue } from '../../utility-types' +import type { Draft, MessageValue } from '../../utility-types' import type { PoolOptions } from '../abstract-pool' import { AbstractPool } from '../abstract-pool' @@ -15,15 +15,15 @@ export type ThreadWorkerWithMessageChannel = Worker & Draft * * This pool selects the threads in a round robin fashion. * - * @template Data Type of data sent to the worker. - * @template Response Type of response of execution. + * @template Data Type of data sent to the worker. This can only be serializable data. + * @template Response Type of response of execution. This can only be serializable data. * * @author [Alessandro Pio Ardizio](https://github.com/pioardi) * @since 0.0.1 */ export class FixedThreadPool< - Data extends JSONValue = JSONValue, - Response extends JSONValue = JSONValue + Data = unknown, + Response = unknown > extends AbstractPool { /** * Constructs a new poolifier fixed thread pool.