Concurrency
@MainActor does not always mean main thread
Seems to me some developers think that @MainActor means “always main thread” and has the same behaviour as DispatchQueue.main.async which I don’t think is try. For example, the code below outputs: Because the Database class is not marked as @MainActor then loadModel will in fact be on a background thread, Read more…