GithubHelp home page GithubHelp logo

Comments (5)

suguru03 avatar suguru03 commented on June 8, 2024 1

I published it on v2.5.1, could you check it? Thanks! 😸

from neo-async.

e174596549 avatar e174596549 commented on June 8, 2024 1

This version can be executed correctly. Thanks! 👍🏻

from neo-async.

suguru03 avatar suguru03 commented on June 8, 2024

Thanks for the issue!

I have the test case and can't reproduce it.
Which version are you using? Also, do you have any code to reproduce it?

it('should stop execution if a synchronous error occur', function(done) {
async.auto({
task1: function(callback) {
callback('error');
},
task2: function(callback) {
assert.ok(false);
callback();
}
}, 1, function(err) {
assert.strictEqual(err, 'error');
setTimeout(done, delay);
});
});

from neo-async.

e174596549 avatar e174596549 commented on June 8, 2024

neo-async v2.5

const async = require('neo-async');

async.auto({
    task1: function(callback) {
        setTimeout(()=>{callback('error')}, 1000)
    },
    task2: function(callback) {
        setTimeout(()=>{callback(false)}, 2000)
    },
    task3: ['task1', 'task2', function(callback) {
        setTimeout(()=>{callback(false)}, 2000)
    }]
}, function(err) {
    if(err) {
        return console.log('err: ', err)
    }
    console.log('done')
});

/usr/local/bin/node /Users/neo-async-test.js
err:  error
/Users/node_modules/.2.5.0@neo-async/async.js:8167
          throw new Error('async.auto task has cyclic dependencies');
          ^

Error: async.auto task has cyclic dependencies
    at proceedQueue (/Users/node_modules/.2.5.0@neo-async/async.js:8167:17)
    at taskComplete (/Users/node_modules/.2.5.0@neo-async/async.js:8187:7)
    at done (/Users/node_modules/.2.5.0@neo-async/async.js:8153:9)
    at Timeout.setTimeout [as _onTimeout] (/Users/neo-async-test.js:8:25)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)

async v2.1.4

const async = require('async');

async.auto({
    task1: function(callback) {
        setTimeout(()=>{callback('error')}, 1000)
    },
    task2: function(callback) {
        setTimeout(()=>{callback(false)}, 2000)
    },
    task3: ['task1', 'task2', function(callback) {
        setTimeout(()=>{callback(false)}, 2000)
    }]
}, function(err) {
    if(err) {
        return console.log('err: ', err)
    }
    console.log('done')
});


err:  error

Process finished with exit code 0

from neo-async.

suguru03 avatar suguru03 commented on June 8, 2024

@e174596549
I can reproduce it!
I'll fix it soon, thanks! 😄

from neo-async.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.