Type Alias ISemaphoreAcquiredState

ISemaphoreAcquiredState: {
    acquiredSlots: string[];
    acquiredSlotsCount: number;
    freeSlotsCount: number;
    limit: number;
    remainingTime: TimeSpan | null;
    type: typeof SEMAPHORE_STATE["ACQUIRED"];
}

Represents a semaphore where at least one slot has been acquired by the requester. The requester holds exclusive control over one or more slots.

IMPORT_PATH: "@daiso-tech/core/semaphore/contracts"

Type declaration

  • acquiredSlots: string[]

    Array of unique identifiers for all entities that currently hold acquired slots (including the requester).

  • acquiredSlotsCount: number

    The total number of slots currently held by this and other requesters.

  • freeSlotsCount: number

    The number of slots currently available for acquisition by other requesters.

  • limit: number

    The maximum number of slots that can be simultaneously held.

  • remainingTime: TimeSpan | null

    The time remaining before the acquired slots expire. null indicates slots that do not expire.

  • type: typeof SEMAPHORE_STATE["ACQUIRED"]

    The state type indicator.