Avatar
@swift-5.5.3 -warn-concurrency import Foundation func f2() async -> Int { 42 } class Nanika { var value = 0 func f() async { let _ = await f2() value += 1 print(value) } } let nanika = Nanika() for _ in 0..<10 { Task.detached { await nanika.f() } } sleep(1) (edited)