caolan/async — pull request #474 by maxkueng (2014-03-28 22:52:55+00:00)
Title: queue.pause() and queue.resume()

I've added 2 new methods to `async.queue` that allow to pause and resume a queue. PR includes tests and documentation updates.

- `paused` - a boolean for determining whether the queue is in a paused state.
- `pause()` - a function that pauses the processing of tasks until `resume()` is called.
- `resume()` - a function that resumes the processing of queued tasks when the queue is paused.

Example:

```javascript
var q = async.queue(function (task, callback) {
console.log('task', task);
callback();
});

console.log('pausing');
q.pause();
q.push(1);
q.push(2);
q.push(3);
console.log('resuming');
q.resume();
```

```
pausing
resuming
task 1
task 2
task 3
```