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

Failure to handle promise that is resolved before promise is returned #76

Closed
derrickburns opened this issue Apr 18, 2011 · 5 comments
Closed

Comments

@derrickburns
Copy link

One problem with using event emitters as promises is that there is no way to find out if an event has been emitted already or not. So, using an event emitter as a promise is problemmatic if the promise has been fulfilled prior to the return from the execution of the topic, i.e. the asynchronous code is actually executed synchronously.

@dunkfordyce
Copy link

this has just bitten me also. it would be better a "proper" promise ( like jquery Deferred or any of the commonjs promise types ) was used.

@indexzero
Copy link

This is really a documentation bug. We don't have promises per-se, this is actually a left-over from when node did have promises for a very brief period of time in 2010.

We should update our code to be "emitter" everywhere.

@indexzero
Copy link

Added the website tag because the vowsjs.org website has "promise" in a lot of example code.

@indexzero
Copy link

Fixed in 73872a8. Will open a corresponding bug on the website.

@ghost
Copy link

ghost commented Mar 20, 2016

is it possible to add an example to the docs that show how one would use Vows.js with a promise-library such as Bluebird? I've tried to use Bluebird's asCallback functionality which kinda works, but there's also the EventEmitter strategy that Vows.js provides but I'm not sure how it would fit in with promises.

Thanks for the work you've done on this library, it's been really helpful!

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

Successfully merging a pull request may close this issue.

4 participants