API reference › @evolu/common › Task › createSemaphoreByKey
Call Signature
function createSemaphoreByKey<K>(permits: Concurrency): SemaphoreByKey<K>;
Defined in: packages/common/src/Task.ts:2640
Creates a SemaphoreByKey.
Each key gets its own semaphore with the same permit capacity.
Call Signature
function createSemaphoreByKey<K, L>(
permits: Concurrency,
options: CreateSemaphoreByKeyOptions<K, L>,
): SemaphoreByKey<K>;
Defined in: packages/common/src/Task.ts:2643
Creates a SemaphoreByKey.
Each key gets its own semaphore with the same permit capacity.