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

Explore issues with asynchronous query execution #11

Open
lastmjs opened this issue Jan 18, 2018 · 2 comments
Open

Explore issues with asynchronous query execution #11

lastmjs opened this issue Jan 18, 2018 · 2 comments

Comments

@lastmjs
Copy link
Member

lastmjs commented Jan 18, 2018

Render or stateChange functions could have issues because of the asynchronous nature of the execute query call. The state might change between when the subscription callback is called and the query is executed.

@lastmjs
Copy link
Member Author

lastmjs commented Jan 19, 2018

The problem is that when I run an update, I have no gaurantee that the render or stateChange function has been called even after awaiting the promise, since the render function is called asynchronously from somewhere in the asynchronous execute call...perhaps generators could help with this...

@lastmjs
Copy link
Member Author

lastmjs commented Jan 19, 2018

Or consider returning a promise and passing around the resolve function appropriately to resolve after the subscription is called

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