1.1.0 • Published 2 years ago
semapro v1.1.0
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
2 years ago
1.0.1-dev.6
5 years ago
1.0.1-dev.5
5 years ago
1.0.1-dev.4
5 years ago
1.0.1-dev.3
5 years ago
1.0.1-dev.2
5 years ago
1.0.1-dev.1
5 years ago
1.0.1-dev.0
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago