caolan / async

Async utilities for node and the browser
http://caolan.github.io/async/
MIT License
28.18k stars 2.41k forks source link

async.queue sometime not end task #1778

Closed vtlong closed 2 years ago

vtlong commented 2 years ago

What version of async are you using? ^3.2.2 Which environment did the issue occur in (Node version/browser version) Node: >=12 npm: 6.14.11

Hi , I have problem with async.queue.

my example:

var queue = async.queue((infos, callback) => {
      var task = new MyTask(infos);
      task.on('task_done', (error) => {
           console.log('Finish processing task: ', infos.ID);
           callback();
      });

     tart.start();
}, 5);

Anybody help me?

Thanks!

ps: sorry for my english.

aearly commented 2 years ago

Need more info on the implementation of MyTask.