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

Modifications to Q.async #659

Closed
wants to merge 1 commit into from
Closed

Conversation

sjmeverett
Copy link

This pull request supports the following use cases:

  • the ability to call Q.async on any function, without caring if it is a generator function or not: if it is a regular function you get a promise for the return value, if it returns a promise you get that promise, and if it is a generator function it behaves like the original Q.async
  • the ability to just type yield anotherGeneratorFunction() instead of yield* anotherGeneratorFunction() or yield Q.async(anotherGeneratorFunction())

@kriskowal
Copy link
Owner

I try to keep concerns separate. I’m sympathetic to the case for convenience, but this comes at a high cost in clarity. There is Q.promised(f) (among other things) for the one case, and Q.async(g) for the other.

@kriskowal kriskowal closed this May 19, 2015
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

Successfully merging this pull request may close these issues.

None yet

2 participants