Skip to content

PromiseScheduler, a scheduler to run promises in batch mode per the max concurrency set when creating. You can simply submit all your promises at any time as you wish, then all the concurrent behavior will be controlled by it.

tibetty/PromiseScheduler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

PromiseScheduler

PromiseScheduler, a scheduler to run promises in batch mode per the max concurrency set when creating. You can simply submit all your promises at any time as you wish, then all the concurrent behavior will be controlled by it.

Usage

// Initialization
const PromiseScheduler = require('promise-scheduler');
let scheduler = new PromiseScheduler(<maxConcurrency>);
// When you want to submit a promise
scheduler.submit(<your promise function>, <your parameters in array>, <your then function>, <your catch function>);

Dependency

No third party dependency, but of course need ES6 that features Promise.

About

PromiseScheduler, a scheduler to run promises in batch mode per the max concurrency set when creating. You can simply submit all your promises at any time as you wish, then all the concurrent behavior will be controlled by it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published