0.3.1 • Published 4 years ago

wait-group-promise v0.3.1

Weekly downloads
79
License
MIT
Repository
github
Last release
4 years ago

wait-group-promise

An implementation of the Go's WaitGroup for Node.js.

Installation

npm install --save wait-group-promise

Usage

const WaitGroup = require('wait-group-promise');

const wg = new WaitGroup();

wg.add(2);

const p = wg.wait();

setTimeout(() => {
  wg.done();
}, 5000);
  
setTimeout(() => {
  wg.done();
}, 3000);

await p;
0.3.1

4 years ago

0.3.0

5 years ago

0.2.0

6 years ago

0.1.0

6 years ago