jessetane / queue

Asynchronous function queue with adjustable concurrency
MIT License
764 stars 66 forks source link

q.start does not run with autostart option #87

Open Sleepful opened 2 years ago

Sleepful commented 2 years ago

basically, add this at the bottom of example/index.js

setTimeout(() => {
  q.push(function (cb) {
    const result = 'another'
    cb(null, result)
  })
}, 2800)

this will trigger the cb on q.on('success', cb) when 'another' result is ready.

but it does not trigger the cb on q.start(cb) when 'another' result is ready.

expected q.start to get triggered, seems like the semantics of autostart implies it.