ctietze, #Swift async/await question:
What are the patterns/conventions to expose
async
closures in one place, and handle getting back to the main queue in another?Context:
The Xcode warning here makes perfect sense:
"""
Publishing changes from background threads is not allowed; make sure to publish values from the main thread (via operators like receive(on:)) on model updates.
"""A dummy implementation of an
async throws
closure modified an view model directly. (It's annotated MainActor.)
Add comment