1.1.0 • Published 4 years ago

semapro v1.1.0

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

semapro

Provides a semaphore for limiting the number of promise based jobs running at once.

import create from 'semapro';

// allow up to three jobs to be running at once
const semaphore = create(3); 

// call the semaphore with a function that returns a promise
semaphore(() => Promise.resolve('result')).then(result => {
  // result === 'result'
});

See the tests for usage with async/await.

1.1.0

4 years ago

1.0.1-dev.6

7 years ago

1.0.1-dev.5

7 years ago

1.0.1-dev.4

7 years ago

1.0.1-dev.3

7 years ago

1.0.1-dev.2

7 years ago

1.0.1-dev.1

7 years ago

1.0.1-dev.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago