Hi, I was reading the proposal SE-0302, and I came across the term concurrency domain. What do the authors of SE-0302 mean by a concurrency domain? For example, how does one go about creating a new concurrency domain? This term is brought up a lot in the proposal and I was hoping someone could clarify what it means, such as in “As such, a key question is: ‘when and how do we allow data to be transferred between concurrency domains?’” Is this interchangeable with the term concurrency context that is found in the definition of the Sendable protocol? Thank you
This is an informal term for entities whose code can run concurrently w.r.t. other things: actors and tasks from Swift Concurrency, but also GCD dispatch queues, threads etc. And yes, that should be equivalent to what the Sendable docs call concurrency contexts; specifically this means that a Sendable value can be safely accessed and/or mutated from multiple such domains/contexts.
1 Like
I believe other proposals call this an “isolation domain.”
3 Likes
Yes, "isolation domain" is the preferred term these days. "concurrency domain" is a rather vague term that could be quite easily misinterpreted. Then again, there also seems to be a recent trend towards inventing bespoken names for very specific circumstances, à la SE 414.