[Pitch] Transactional observation of values

I have taken a bit to look at this as an alternative and it really looks much better to me, I think this is worthwhile pursuing as a refinement for this pitch. There is another slight alteration this opens up; we could perhaps remove the @Sendable requirement... however I have yet to prove that is actually safe.

If the isolation is provided then the call site being inherited to the block means that the block MUST be as sendable as the exterior to the closure. That means that when the exterior is non-isolated then the interior must be safe already. If the exterior is isolated then the interior must be safe to the same isolation too. So that means that if the closure is always called on the matching isolation then (either isolated or not) then that means that we should be able to preserve the correct safety guarentees. Even if the type does not require @Sendable.

1 Like