constructor(concurrent, bufferSize) {
    assert(
      typeof concurrent === "number" && concurrent > 0,
      "Cannot instantiate pipes executor: invalid maxConcurrentPipes parameter value",
    );
    assert(
      typeof bufferSize === "number" && bufferSize > 0,
      "Cannot instantiate pipes executor: invalid pipesBufferSize parameter value",
    );

    this.maxConcurrent = concurrent;
    this.running = 0;
    this.maxBufferSize = bufferSize;
    this.buffer = new Denque();

    this._boundRunNext = this._runNext.bind(this);
  }
@class PipeRunner
Runs pipe chains if the number of already running concurrent pipes allows it.
Otherwise, delays the pipe chain until a slot is freed. If the storage
buffer is full, rejects the provided callback and discard the pipe chain.

@param {Number} concurrent - max number of concurrent pipes
@param {Number} bufferSize - max number of delayed pipe chains