@buttercup/channel-queue
Version:
A queue management library with channels
33 lines (32 loc) • 764 B
TypeScript
import { Channel } from "./Channel";
import { Task } from "./Task";
/**
* ParallelChannel class (queue)
* @augments Channel
*/
export declare class ParallelChannel extends Channel {
private _parallelism;
private _runningTasks;
canRunAcrossTaskTypes: boolean;
constructor(name: string);
/**
* Whether the queue is empty or not
* @type {Boolean}
* @readonly
*/
get isEmpty(): boolean;
/**
* The amount of allowed parallel executed tasks
* @type {Number}
* @readonly
*/
get parallelism(): number;
/**
* Get the currently running tasks
* @type {Array<Task>}
* @readonly
*/
get runningTasks(): Task[];
set parallelism(count: number);
_runNextItem(): void;
}