Hello. I have a variable marked with one of my Global Actor. Next, I going to mutate it within one of created by me concurrent task. What is different between detached and regular tasks?
// Actors Pool
@globalActor
public struct DuckActor {
public actor Actor {}
public static let shared = Actor()
}
@DuckActor var globalTextSize: Int = 0
func checkDuck() {
Task.detached { @DuckActor in
globalTextSize = 10
}
Task { @DuckActor in
globalTextSize = 10
}
// what is different bertween these tasks?
}