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

async/await #39

Closed
herenickname opened this issue Sep 6, 2018 · 5 comments
Closed

async/await #39

herenickname opened this issue Sep 6, 2018 · 5 comments

Comments

@herenickname
Copy link

function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms))
}

const q = new Queue(async (input, cb) => {
  console.log(input)
  await sleep(1000)
  cb()
}, {
  concurrent: 3
})

Now I need to call in async callback functions. Can you do an automatic wait for asynchronous functions? To remove that callback

@LinusU
Copy link

LinusU commented Sep 6, 2018

I would love a 4.x where all callbacks are replaced by Promises ☺️

@leanderlee
Copy link
Member

Me too! Anyone want to take a shot at it?

@leanderlee
Copy link
Member

Duplicate of #23

@leanderlee leanderlee marked this as a duplicate of #23 Sep 6, 2018
@nombrekeff
Copy link

Me too! Anyone want to take a shot at it?

I might have a take on this!

@njinvozone
Copy link

any update on 4.X ?

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

5 participants