ixfx
    Preparing search index...

    Namespace Queues

    Queues store items in the order in which they are added.

    Functions

    debug
    dequeue
    enqueue

    Adds to the back of the queue (last array index) Last item of toAdd will potentially be the new end of the queue (depending on capacity limit and overflow policy)

    immutable

    Returns an immutable queue. Queues are useful if you want to treat 'older' or 'newer' items differently. Enqueing adds items at the back of the queue, while dequeing removes items from the front (ie. the oldest).

    isEmpty
    isFull
    mutable

    Creates a new QueueMutable

    peek

    Returns front of queue (oldest item), or undefined if queue is empty

    priority

    Creates a PriorityMutable queue.

    trimQueue

    Classes

    PriorityMutable

    Simple priority queue implementation. Higher numbers mean higher priority.

    Interfaces

    IPriorityQueueMutable

    Queue (mutable). See also IQueueImmutable for the immutable version.

    IQueueImmutable

    Queue (immutable). See also QueueMutable.

    IQueueMutable

    Queue (mutable). See also IQueueImmutable for the immutable version.

    IQueueMutableWithEvents

    Queue (mutable). See also IQueueImmutable for the immutable version.

    References

    QueueDiscardPolicy → QueueDiscardPolicy
    QueueImmutable → QueueImmutable
    QueueMutable → QueueMutable
    QueueOpts → QueueOpts

    Type Aliases

    PriorityItem

    A prioritised item in queue

    QueueMutableEvents