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
How to block until promise completes? #178
Comments
Hi Eric, you can try awaitPromise or that https://github.com/google/promises/blob/master/g3doc/index.md#awaitpromise |
Is there a different import for awaitPromise? It seems to not be included in |
also, is |
I have a use case that needs to use Promises, but the old calling code is synchronous. In Swift, is there a way to block the synchronous caller to wait for the promise to finish? I don't think I can use a custom dispatch queue since it needs to execute on the main thread.
Callback methods unfortunately do not work since the promise needs to start and complete at the middle of a long chain of synchronous commands.
The text was updated successfully, but these errors were encountered: