You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
also, is awaitPromise only usable from within another Promise? If I'm executing code on the main thread, I'd like to block that immediately for a return from a promise on a different thread. If I have to create a new Promise on main to block on an existing promise, that new Promise will not be able to execute until all the main thread processing is complete
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: