Variable SEMAPHORE_STATEConst

SEMAPHORE_STATE: {
    ACQUIRED: "ACQUIRED";
    EXPIRED: "EXPIRED";
    LIMIT_REACHED: "LIMIT_REACHED";
    UNACQUIRED: "UNACQUIRED";
} = ...

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"

Type declaration

  • ReadonlyACQUIRED: "ACQUIRED"

    At least one slot has been successfully acquired by the requester. The requester has exclusive control over one or more slots.

  • ReadonlyEXPIRED: "EXPIRED"

    All semaphore slots have expired. If the semaphore has an expiration policy, an expired state indicates all slots can be reclaimed.

  • ReadonlyLIMIT_REACHED: "LIMIT_REACHED"

    All available slots have been acquired and the limit is reached. No additional slots can be acquired until existing slots are released or expire.

  • ReadonlyUNACQUIRED: "UNACQUIRED"

    No slots have been acquired by the requester, but slots remain available. The semaphore has available capacity for additional acquisitions.