diff options
-rw-r--r-- | lib/queue.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/queue.js b/lib/queue.js index 4bee1bd..53cf4ad 100644 --- a/lib/queue.js +++ b/lib/queue.js @@ -51,7 +51,8 @@ import wrapAsync from './internal/wrapAsync'; * callback is omitted, `q.drain()` returns a promise for the next occurrence. * @property {Function} error - a function that sets a callback that is called * when a task errors. Has the signature `function(error, task)`. If the - * callback is omitted, `error()` returns a promise for the next error. + * callback is omitted, `error()` returns a promise that rejects on the next + * error. * @property {boolean} paused - a boolean for determining whether the queue is * in a paused state. * @property {Function} pause - a function that pauses the processing of tasks @@ -125,9 +126,8 @@ import wrapAsync from './internal/wrapAsync'; * q.push({name: 'foo'}, function(err) { * console.log('finished processing foo'); * }); - * q.push({name: 'bar'}, function (err) { - * console.log('finished processing bar'); - * }); + * // callback is optional + * q.push({name: 'bar'}); * * // add some items to the queue (batch-wise) * q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function(err) { |