Closure isolation control

The current rule is that closures passed to the Task initializer from an actor-reference-isolated context (i.e. not isolated to a global actor) only inherit the current isolation context if they actually capture the enclosing context’s isolated reference. So that is not currently redundant. However, the proposal includes changing that rule so that those closures will inherit the isolation unless the isolation is explicitly specified otherwise. So it will be redundant under the proposal.

3 Likes