Removed max tasks (#225)
[poolifier.git] / src / pools / abstract-pool.ts
index 38187edc41b462fc9944744f3cfbce16d9c595e4..9d7e4f0c2306ad2dd9970cc7ac7cd9094959b136 100644 (file)
@@ -82,15 +82,6 @@ export interface PoolOptions<Worker> {
    * A function that will listen for exit event on each worker.
    */
   exitHandler?: ExitHandler<Worker>
-  /**
-   * This is just to avoid non-useful warning messages.
-   *
-   * Will be used to set `maxListeners` on event emitters (workers are event emitters).
-   *
-   * @default 1000
-   * @see [Node events emitter.setMaxListeners(n)](https://nodejs.org/api/events.html#events_emitter_setmaxlisteners_n)
-   */
-  maxTasks?: number
   /**
    * The work choice strategy to use in this pool.
    */
@@ -152,12 +143,12 @@ export abstract class AbstractPool<
    *
    * @param numberOfWorkers Number of workers that this pool should manage.
    * @param filePath Path to the worker-file.
-   * @param opts Options for the pool. Default: `{ maxTasks: 1000 }`
+   * @param opts Options for the pool.
    */
   public constructor (
     public readonly numberOfWorkers: number,
     public readonly filePath: string,
-    public readonly opts: PoolOptions<Worker> = { maxTasks: 1000 }
+    public readonly opts: PoolOptions<Worker>
   ) {
     if (!this.isMain()) {
       throw new Error('Cannot start a pool from a worker!')