summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Early <alexander.early@gmail.com>2015-05-20 23:43:03 -0700
committerAlexander Early <alexander.early@gmail.com>2015-05-20 23:43:03 -0700
commit78a77f4c8306c2783d33309220451a15fde1ea02 (patch)
tree895ce4eda097451f0e1ac95f33deef36e6ccd6f4
parent651232ed9f4779b6cecf58cbeb1c6b99e56f16b5 (diff)
downloadasync-78a77f4c8306c2783d33309220451a15fde1ea02.tar.gz
clarify queue docs. closes #589 and #599
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 01ab163..4e0b9fc 100644
--- a/README.md
+++ b/README.md
@@ -1128,7 +1128,7 @@ The same as [`applyEach`](#applyEach) only the functions are applied in series.
---------------------------------------
<a name="queue" />
-### queue(worker, concurrency)
+### queue(worker, [concurrency])
Creates a `queue` object with the specified `concurrency`. Tasks added to the
`queue` are processed in parallel (up to the `concurrency` limit). If all
@@ -1139,9 +1139,9 @@ __Arguments__
* `worker(task, callback)` - An asynchronous function for processing a queued
task, which must call its `callback(err)` argument when finished, with an
- optional `error` as an argument.
+ optional `error` as an argument. If you want to handle errors from an individual task, pass a callback to `q.push()`.
* `concurrency` - An `integer` for determining how many `worker` functions should be
- run in parallel.
+ run in parallel. If omitted, the concurrency defaults to `1`. If the concurrency is `0`, an error is thrown.
__Queue objects__