SE-0423: Dynamic actor isolation enforcement from non-strict-concurrency contexts

No, adding isolation in subclasses is more complicated because of the implicit Sendable conformance that comes with global-actor isolation on classes. It allows violating Sendable rules by smuggling non-Sendable state from the superclass over isolation boundaries, which can lead to concurrent access. Though this isn't covered by this proposal, I'm working on a separate proposal to lift some of these restrictions (at the cost of other restrictions, but I believe the other restrictions are a little easier to work with).

In case you didn't see it, there's a thread over in Using Swift specifically about this pattern of isolating an XCTestCase subclass to the main actor and strategies for resolving the warnings in 5.10: Swift 5.10 Concurrency and XCTest

1 Like