How to block until promise completes?
Open
- Dominant language
- Objective-C
- Stars
- 3.8k
- Forks
- 316
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.