Skip to main content

6 docs tagged with "Semaphore"

View all tags

Semaphore middlewares

The Semaphore middleware wraps function calls with a distributed semaphore, limiting the number of concurrent executions across processes. Before executing the wrapped function, a slot is acquired on a key derived from the function's arguments. If the maximum number of concurrent slots (limit) has already been reached, the call waits (or fails immediately for non-blocking semaphores) until a slot becomes available.

Semaphore usage

The eridu-tech/semaphore component provides a way for managing semaphores independent of underlying platform or storage.

SemaphoreFactoryResolver

The SemaphoreFactoryResolver class provides a flexible way to configure and switch between different semaphore adapters at runtime.