Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    basic-queuepublic

    This package has been deprecated

    Author message:

    This module is now under the @mapbox namespace: install @mapbox/basic-queue instead

    basic-queue

    example

    var Queue = require('basic-queue');
    var q = new Queue(request, concurrency / numWorkers);
     
    function request() {
        q.add();
    }

    api

    q = Queue(callback, concurrency)

    callback is the function that this queue runs. Concurrency is how many simultaneous jobs should run of that function. callback will receive object and callback as arguments. If callback is a call with an error as a first argument, the queue will emit an error event.

    q.add()

    Tell the queue to start a new job if it isn't over the concurrency limit.

    install

    npm i basic-queue

    Downloadslast 7 days

    179

    version

    1.0.1

    license

    BSD

    homepage

    github.com

    last publish

    collaborators

    • avatar
    • avatar