In that case the isolation is not specified from its call site then it will be scheduled as if it is passed nil to the isolation parameter internally. That will mean that the closure (having no particular isolation) will only be able to capture Sendable
things. And therefore should be safe per their construction.
That wouldn't be horrible; it would mean that we have parity to the Observed.untilFinished
method - however I am not sure I have a good name for that handy. Filling in those underscores as an alternative might go a long way to seeing if that is a viable direction.
Names like this were brought up in the initial pre-pitch however there were objections of calling it "Values" since the returns from the closure may not be "value-types"... I'm not fully in that camp myself but that objection was pretty strongly posed, and I can appreciate that confusion like that could exist.
In that case the construction would be in error if the closure was not called on the main actor (and consequently being safe for it's later access), because the initializing closure is not asynchronous and inherits the calling isolation - that means that to use something @MainActor
you have to construct one of these with the isolation of the @MainActor
.
I think that if someone wants to propose a synchronous didSet system; I would be quite willing to collaborate or be a point of reference since those are explorations I have done. I have particularly focused a lot of the designs for Observation in general to leave that carveout of the didSet available still - because I believe it has uses. I think those use cases are perhaps a bit more niche. However, I am quite willing to have a concrete set of uses presented that make a compelling case to say that is not as niche as previous reasoning as posed.