Sobes.tech
Senior
9

let parent = Task { let child = Task { print("child started, isCancelled = ", Task.isCancelled) // for index in (1...[phone]) { print(index) } print("child finished, isCancelled = ", Task.isCancelled) // } await child.value } try? await Task.sleep(nanoseconds: 1_000_000_000) // 1 second parent.cancel()

Companies where asked
Salmon