libp2p
    Preparing search index...

    Interface QueueInit<JobReturnType, JobOptions>

    interface QueueInit<
        JobReturnType,
        JobOptions extends AbortOptions = AbortOptions,
    > {
        concurrency?: number;
        maxSize?: number;
        metricName?: string;
        metrics?: Metrics;
        sort?: Comparator<Job<JobOptions, JobReturnType>>;
    }

    Type Parameters

    Index

    Properties

    concurrency?: number

    Concurrency limit.

    Minimum: 1.

    Infinity
    
    maxSize?: number

    If the queue size grows to larger than this number the promise returned from the add function will reject

    Infinity
    
    metricName?: string

    The name of the metric for the queue length

    metrics?: Metrics

    An implementation of the libp2p Metrics interface

    An optional function that will sort the queue after a job has been added