dispatch:infinite-queue

v0.0.3Published 10 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

dispatch:infinite-queue

1  var syncQueue = createQueue();
2
3  syncQueue.add(function() {
4    // Task
5    this.next();
6  });

Options

  • minDuration - Set the minimum queue duration

Api

  • .add(task) - Run task
  • .addEvery(tick, task) - Run task at every 1 or n tick
  • .next() - Run next task

TODO:

  • Write basic tests
  • Option to set limit on simultane running tasks