Skip to content
Commitwise
Menu

Isolation domain

In Swift concurrency, the region that owns some mutable state: an actor, the main actor, or nonisolated code.

Definition

Each actor, including the main actor, owns its state and runs one piece of its code at a time; code outside must await to reach it. Values that move from one domain to another must be Sendable. Choosing the isolation of each type is the core design decision when adopting the Swift 6 language mode.

In practice

View models live on the main actor, the image cache is its own actor, and models are Sendable structs that move between them.

Learn it in context

Lessons that use this term.

Related terms

Esc

Type to search the whole site.