build(deps-dev): apply updates
[poolifier.git] / src / pools / abstract-pool.ts
index 06cdc3cd5d635c1e13b209228631bea7e6960fd6..71067f5ce21f7debd3a687d8eb1d97a36a215079 100644 (file)
@@ -180,6 +180,9 @@ export abstract class AbstractPool<
   /** @inheritDoc */
   public abstract get type (): PoolType
 
+  /** @inheritDoc */
+  public abstract get size (): number
+
   /**
    * Number of tasks running in the pool.
    */
@@ -305,9 +308,10 @@ export abstract class AbstractPool<
   }
 
   /** @inheritDoc */
-  public async execute (data?: Data): Promise<Response> {
+  public async execute (data?: Data, name?: string): Promise<Response> {
     const [workerNodeKey, workerNode] = this.chooseWorkerNode()
     const submittedTask: Task<Data> = {
+      name,
       // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
       data: data ?? ({} as Data),
       id: crypto.randomUUID()