@daiso-tech/core
Version:
The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.
34 lines • 1.21 kB
JavaScript
/**
* @module Semaphore
*/
import {} from "../../time-span/implementations/_module.js";
/**
* Enumeration of semaphore operational states.
* Represents the possible status conditions a semaphore can have, tracking slot availability and acquisition.
*
* IMPORT_PATH: `"@daiso-tech/core/semaphore/contracts"`
* @group Contracts
*/
export const SEMAPHORE_STATE = {
/**
* All semaphore slots have expired.
* If the semaphore has an expiration policy, an expired state indicates all slots can be reclaimed.
*/
EXPIRED: "EXPIRED",
/**
* All available slots have been acquired and the limit is reached.
* No additional slots can be acquired until existing slots are released or expire.
*/
LIMIT_REACHED: "LIMIT_REACHED",
/**
* At least one slot has been successfully acquired by the requester.
* The requester has exclusive control over one or more slots.
*/
ACQUIRED: "ACQUIRED",
/**
* No slots have been acquired by the requester, but slots remain available.
* The semaphore has available capacity for additional acquisitions.
*/
UNACQUIRED: "UNACQUIRED",
};
//# sourceMappingURL=semaphore-state.contract.js.map