summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Early <alexander.early@gmail.com>2019-05-19 17:33:44 -0700
committerAlexander Early <alexander.early@gmail.com>2019-05-19 17:33:44 -0700
commitde2f648cd07bb1b5d6daa223d11122dd7032cf4a (patch)
tree51a6786c959bd1bed7eb445fa63674cb4bbceee2
parent70624e42b59194b3e5d51d201ad5be344f57c3a6 (diff)
downloadasync-awaitable-queues.tar.gz
clarify docsawaitable-queues
-rw-r--r--lib/queue.js8
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) {