[Pkg-javascript-commits] [node-async] 390/480: Merge pull request #441 from dandv/patch-1

Jonas Smedegaard js at moszumanska.debian.org
Fri May 2 08:58:45 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository node-async.

commit 287cb65116c34f5fff1b953c6b9a95bce0a3dbde
Merge: f8cb033 4e2da57
Author: Caolan McMahon <caolan.mcmahon at gmail.com>
Date:   Fri Mar 28 12:40:40 2014 +0000

    Merge pull request #441 from dandv/patch-1
    
    Clarify how cargo differs from queue

 README.md | 4 ++++
 1 file changed, 4 insertions(+)

diff --cc README.md
index c093f7b,36b5b74..fd9282a
--- a/README.md
+++ b/README.md
@@@ -1019,17 -999,21 +1019,21 @@@ q.unshift({name: 'bar'}, function (err
  <a name="cargo" />
  ### cargo(worker, [payload])
  
 -Creates a cargo object with the specified payload. Tasks added to the
 -cargo will be processed altogether (up to the payload limit). If the
 -worker is in progress, the task is queued until it is available. Once
 -the worker has completed some tasks, each callback of those tasks is called.
 +Creates a `cargo` object with the specified payload. Tasks added to the
 +cargo will be processed altogether (up to the `payload` limit). If the
 +`worker` is in progress, the task is queued until it becomes available. Once
 +the `worker` has completed some tasks, each callback of those tasks is called.
  
+ While [queue](#queue) passes only one task to one of a group of workers
+ at a time, cargo passes an array of tasks to a single worker, repeating
+ when the worker is finished.
+ 
  __Arguments__
  
 -* worker(tasks, callback) - An asynchronous function for processing an array of
 -  queued tasks, which must call its callback(err) argument when finished, with 
 -  an optional error as an argument.
 -* payload - An optional integer for determining how many tasks should be
 +* `worker(tasks, callback)` - An asynchronous function for processing an array of
 +  queued tasks, which must call its `callback(err)` argument when finished, with 
 +  an optional `err` argument.
 +* `payload` - An optional `integer` for determining how many tasks should be
    processed per round; if omitted, the default is unlimited.
  
  __Cargo objects__

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-async.git



More information about the Pkg-javascript-commits mailing list