export = PipeRunner; /** * @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 */ declare class PipeRunner { constructor(concurrent: any, bufferSize: any); maxConcurrent: number; running: number; maxBufferSize: number; buffer: Denque; _boundRunNext: any; /** * @warning Critical code section * * Pipes can be run thousands of times per seconds * @param {Array} chain - functions chain * @param {Array} args - functions arguments * @param {Function} callback - end-of-chain callback * @param {Object} callbackContext - functions/callback context */ run(chain: any[], args: any[], callback: Function, callbackContext: any): void; _runNext(): void; } import Denque = require("denque");