# co-parallel

> parallel execution with concurrency control

Latest version **1.0.0** (published 2014-03-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install co-parallel
pnpm add co-parallel
yarn add co-parallel
bun add co-parallel
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2014-03-04 |
| First published | 2014-01-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 108 |
| Maintainers | tjholowaychuk |
| Keywords | co, generators, parallel, concurrent |

## Links

- npm: https://www.npmjs.com/package/co-parallel
- Repository: https://github.com/visionmedia/co-parallel
- Issues: https://github.com/visionmedia/co-parallel/issues
- npm.io page: https://npm.io/package/co-parallel

## Dependencies (1)

- [co-thread](https://npm.io/package/co-thread.md) 0.0.1

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2014-03-04
- 0.0.1 — 2014-01-03

## README

# co-parallel

  Parallel execution with concurrency support that maintains result ordering.

## Installation

```
$ npm install co-parallel
```

## Example

```js
var parallel = require('co-parallel');
var request = require('co-request');
var co = require('co');

var urls = [
  'http://google.com',
  'http://yahoo.com',
  'http://ign.com',
  'http://cloudup.com',
  'http://myspace.com',
  'http://facebook.com',
  'http://segment.io'
];

function *status(url) {
  console.log('GET %s', url);
  return (yield request(url)).statusCode;
}

co(function *(){
  var reqs = urls.map(status);
  var res = yield parallel(reqs, 2);
  console.log(res);
})();
```

## API

### parallel(thunks, [concurrency])

  Execute `thunks` in parallel, with the given
  `concurrency` defaulting to 5.

# License

  MIT

---
_Source: https://npm.io/package/co-parallel · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
