Skip to content

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

License

Notifications You must be signed in to change notification settings

zignd/wait-group-promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published