Read MainActor usage in Swift explained to dispatch to the main thread.