SE-0414 (second review): Region Based Isolation

Yes, you're right. That the closure result value is part of the actor's region along with the parameters and captures would naturally fall out of the other region merging rules, except that the implementation of assumeIsolated unsafe casts away the isolation in order to call the closure. I think this is a problem with the API, and it needs to be changed to require a Sendable result value. If we pursue the "transferring result type" future direction of this proposal, we could add an overload of assumeIsolated that accepts a closure returning a (strawman syntax) transferring T result type where T is not required to conform to Sendable.

2 Likes