Actor

Common protocol to which all actors conform.

iOS
13.0+
macOS
10.15+
tvOS
13.0+
watchOS
6.0+
protocol Actor : AnyObject, Sendable
Browse conforming types

The Actor protocol generalizes over all actor types. Actor types implicitly conform to this protocol.

Actors and SerialExecutors

By default, actors execute tasks on a shared global concurrency thread pool. This pool is shared by all default actors and tasks, unless an actor or task specified a more specific executor requirement.

It is possible to configure an actor to use a specific SerialExecutor, as well as impact the scheduling of default tasks and actors by using a TaskExecutor.