@teomatteo89@tonyarnold I think this gets to the root of my question. Are you trying to force conformances to be actor types? And if so, why? Could you make the property async instead?
@mattiem@teomatteo89 I had wrapped access to a property that I wanted to protect from data races in an actor, and it conformed to a protocol. Marking the property as nonisolated negated what I was trying to do, but it sounds like marking the protocol as Actor vs AnyActor fixes what I was seeing.
@rjmccall yeah - right now, if I declare nothing in the protocol, it seems to require marking the property in my implementation as nonisolated. That's not what I want.
@tonyarnold@rjmccall is there a reason for attaching this to a property rather than adding an Actor requirement to the protocol? (The alternate is generally to make things the conformance requires async, which might be the thing you’re running into rather than isolation.)
@tonyarnold@cocoaphony@rjmccall I just did a test locally, if I mark the protocol Actor it works as expected, marking the protocol as AnyActor gives the nonisolated error.
Add comment