samples/javascript/throttle.js
// create a long running task e.g. use batch for web call
create a long running task e.g. use batch for web call
create a long running task e . g . use batch for web call
function dispatch (batch) {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve(null)
    }, 1500, batch)
  })
}
function dispatch ( batch ) { return new Promise ( ( resolve , reject ) => { setTimeout ( ( ) => { resolve ( null ) } , 1500 , batch ) } ) }
create a long running task e.g.
create a long running task e . g .