Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Llamas committed Jan 31, 2015
1 parent 0b9df6d commit 4f6180d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 21 deletions.
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
CHANGES
examples
test
.npmignore
.travis.yml
17 changes: 1 addition & 16 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,17 +1,2 @@
v0.1.5 (25 Jan 2015)
Bump version.

v0.1.4 (19 Jan 2015)
Added a "baton" parameter.

v0.1.3 (12 Jan 2015)
Bump version.

v0.1.2 (10 Jan 2015)
Bump version.

v0.1.1 (10 Jan 2015)
Bump version.

v0.1.0 (09 Jan 2015)
v0.1.0 (31 Jan 2015)
First release.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ cargo-ship
[![Travis][travis-image]][travis-url]
[![Coveralls][coveralls-image]][coveralls-url]

The extremly well-known parallel execution of tasks, but with a cargo, a shared object where tasks can store data. It's like a cargo ship, cranes (tasks) storing data (cargo). Each task writing to the shared object.
The extremly well-known parallel execution of tasks, but with a cargo, a shared object where tasks can store data. It's like a cargo ship, cranes (tasks) storing cargo (data). Each task writing to the shared object.

It's very useful when you need to call a series of functions in parallel and store the data in a common place.
It's very useful when you need to call a bunch of functions in parallel and store the results in a common place.

```javascript
var cranes = [
Expand All @@ -32,9 +32,10 @@ ship.load(cranes, function (err, cargo) {
});
```

It's basically the same behaviour as the `async.parallel()` with with a slightly and sightly! interface.
It's basically the same behaviour as the `async.parallel()` but with a sightly! and slightly different interface.

___module_.load(cranes[, cargo], callback) : undefined__

___module_.load(cranes[, cargo], callback) : undefined__
Executes all tasks in parallel.

`cranes` is an array of functions to run in parallel. Each function has the signature `function(cargo, done)`, where `cargo` is the shared object and `done` the function to call when the task finishes. As usual, pass an error to `done()` to abort the execution of the tasks. This is the error returned by the `load()` function. Because aborting asynchronous parallel tasks is not possible once they begin, the callback is guaranteed to be called only once with the first error occurred.
Expand Down

0 comments on commit 4f6180d

Please sign in to comment.