* @template Response Type of response of execution.
*/
export interface IPool<Data = unknown, Response = unknown> {
- /**
- * Shut down every current worker in this pool.
- */
- destroy(): Promise<void>
/**
* Perform the task specified in the constructor with the data parameter.
*
* @returns Promise that will be resolved when the task is successfully completed.
*/
execute(data: Data): Promise<Response>
+ /**
+ * Shut down every current worker in this pool.
+ */
+ destroy(): Promise<void>
}