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

asnyc methods should be really async #9

Open
damienklinnert opened this issue Mar 22, 2013 · 0 comments
Open

asnyc methods should be really async #9

damienklinnert opened this issue Mar 22, 2013 · 0 comments

Comments

@damienklinnert
Copy link

methods like run() or withValidAccessToken() take a callback. However, this callback is invoked immediately.

This sometimes leads to unexpected behavior, especially if you want to perform a task after registering the callback, but before it is invoked.

Possible solution: Wrap the function invokation of the callback into a setTimeout(cb, 0).

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