Pitch #3: ConcurrentValue and @concurrent closures

I agree. All public API should be usable across concurrency domains. I added this to the proposal to clarify the intent here, thanks!:

Type should conform to this protocol when the type is designed such that all of their public API is safe to use across concurrency domains. For example, if there are no public mutators, if public mutators are implemented with COW, or if they are implemented with internal locking or some other mechanism.

I also updated the proposal to explicitly discuss the inference rules for @concurrent on closure expressions and also to address the behavior of actor.self in closure expressions.

Thank you all for the feedback,

-Chris

1 Like