Skip to main content
Version: Next

CreateSemaphore

createSemaphore

Creates a new semaphore instance with the specified configuration

Example

const semaphore = createSemaphore({
permits: 5,
timeout: 60000,
storage: new RedisSemaphoreStorage()
});
Signature
function createSemaphore(options: SemaphoreOptions): Semaphore

Parameters

options