How to use async/await in synchronous Swift code with tasks
Learn how to use tasks to call async/await methods from synchronous code.
The async/await feature introduced in Swift 5.5 allows us to write asynchronous code in a shorter and safer way. For a recap on async/await, check out this quick guide on async/await in Swift.
In some situations, we need to call async/await methods or properties from synchronous context. How can we do that?