1.1.0 • Published 3 years ago

semapro v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 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

3 years ago

1.0.1-dev.6

6 years ago

1.0.1-dev.5

6 years ago

1.0.1-dev.4

6 years ago

1.0.1-dev.3

6 years ago

1.0.1-dev.2

6 years ago

1.0.1-dev.1

6 years ago

1.0.1-dev.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago