# uncomplicated-pool

> A simple pool

Latest version **1.1.0** (published 2016-08-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install uncomplicated-pool
pnpm add uncomplicated-pool
yarn add uncomplicated-pool
bun add uncomplicated-pool
```

## 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.1.0 |
| Published | 2016-08-19 |
| First published | 2015-12-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Eoin Groat |
| Maintainers | gaussflayer |
| Keywords | concurrency, pool |

## Links

- npm: https://www.npmjs.com/package/uncomplicated-pool
- Repository: https://github.com/egroat/uncomplicated-pool
- Homepage: https://github.com/egroat/uncomplicated-pool#readme
- Issues: https://github.com/egroat/uncomplicated-pool/issues
- npm.io page: https://npm.io/package/uncomplicated-pool

## Recent versions

- 1.1.0 (latest) — 2016-08-19
- 1.0.5 — 2016-08-19
- 1.0.4 — 2015-12-29
- 1.0.3 — 2015-12-29
- 1.0.2 — 2015-12-29
- 1.0.1 — 2015-12-24
- 1.0.0 — 2015-12-22

## README

# pool

Simple pool for asynchronous tasks

# uncomplicated-pool(size)

initialises a pool of the given size;

# pool(x)

the passed function waits on the pool

# pool()

call when something leaves the pool

# Example

    var pool = require('uncomplicated-pool');
    
    var size = 8; // I'm on an eight core machine?
    
    var actions = 200;
    
    var my_pool, action;
    
    // Define the pool
    my_pool = pool(size);
    
    function my_action(example, parameters, cb) {
      // Some asynchronous action (e.g. running a c program)
      cb();
    }
    
    while(actions--) {
      // Ensure that the pool is left at the completion of an action
      action = function() {
        my_action("Example", "parameters", my_pool);
      }
      
      // Add the action to the pool
      my_pool(action);
    }

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