Skip to content

Documentation / listr2 / Concurrency

Class: Concurrency

Constructors

new Concurrency()

new Concurrency(options): Concurrency

Parameters

options

options.concurrency: number

Returns

Concurrency

Source

packages/listr2/src/utils/concurrency.ts:9

Properties

concurrency

private concurrency: number

Source

packages/listr2/src/utils/concurrency.ts:5


count

private count: number

Source

packages/listr2/src/utils/concurrency.ts:6


queue

private queue: Set<() => void>

Source

packages/listr2/src/utils/concurrency.ts:7

Methods

add()

add<T>(fn): Promise<T>

Type parameters

T

Parameters

fn

Returns

Promise<T>

Source

packages/listr2/src/utils/concurrency.ts:15


flush()

private flush(): void

Returns

void

Source

packages/listr2/src/utils/concurrency.ts:27


run()

private run<T>(fn): Promise<T>

Type parameters

T

Parameters

fn

Returns

Promise<T>

Source

packages/listr2/src/utils/concurrency.ts:39