On a different topic: I wonder how this proposal interacts with SE-0472: Starting tasks synchronously from caller context.
In the sample code below, are we guaranteed that "Fresh value" is printed before doSomethingElse() starts?
// Assume everything has the same isolation
func startObservation() {
let values = Observations { ... }
Task.immediate {
for await value in values {
print("Fresh value", value")
}
}
}
startObservations()
// <- Is 'Fresh value' already printed, here?
doSomethingElse()
If the answer is yes, this is very cool. If not, do we know what prevents it from being possible?