MCPcopy Create free account
hub / github.com/fontsource/fontsource / processingConcurrency

Function processingConcurrency

website/app/utils/processWithConcurrency.ts:20–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18};
19
20const processingConcurrency = () => {
21 const available =
22 typeof navigator === 'undefined' ? 2 : navigator.hardwareConcurrency || 2;
23 return Math.max(1, Math.min(MAX_PROCESSING_CONCURRENCY, available));
24};
25
26export const processWithConcurrency = async <Input, Output>(
27 items: readonly Input[],

Callers 1

processWithConcurrencyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected