class Repository { var value: Int = 0 func doSomething() async { value += 1 } } Task { @MainActor in let repository = Repository() async let x: Void = repository.doSomething() repository.value += 1 await x }