Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buggy multicb #207

Open
arj03 opened this issue Apr 2, 2022 · 1 comment
Open

Buggy multicb #207

arj03 opened this issue Apr 2, 2022 · 1 comment
Assignees

Comments

@arj03
Copy link
Member

arj03 commented Apr 2, 2022

const multicb = require('multicb')
const done = multicb({ pluck: 1 })

function callAsync(cb) {
  setTimeout(() => {
    console.log("inside async")
    cb()
  }, 100)
}

callAsync(done())

done((err, res) => {
  console.log('yo')
})
done((err, res) => {
  console.log('yo2')
})

=>

inside async
yo2

Problem is here discovered in this

@arj03
Copy link
Member Author

arj03 commented Apr 2, 2022

remove callAsync and yo + yo2 is printed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant