MCPcopy Create free account
hub / github.com/ProtonDriveApps/sdk / waitForCapacity

Method waitForCapacity

client/js/src/internal/download/queue.ts:22–25  ·  view source on GitHub ↗
(signal?: AbortSignal)

Source from the content-addressed store, hash-verified

20 private capacity = 0;
21
22 async waitForCapacity(signal?: AbortSignal) {
23 await waitForCondition(() => this.capacity < MAX_CONCURRENT_DOWNLOADS, signal);
24 this.capacity++;
25 }
26
27 releaseCapacity() {
28 this.capacity--;

Callers 2

getFileDownloaderFunction · 0.45

Calls 1

waitForConditionFunction · 0.90

Tested by

no test coverage detected