defaultIsolation(_:_:)
Set the default isolation to the given global actor type.
Declaration
static func defaultIsolation(_ isolation: MainActor.Type?, _ condition: BuildSettingCondition? = nil) -> SwiftSettingParameters
- isolation:
The type of global actor to use for default actor isolation inference. The only valid arguments are
MainActor.selfandnil. - condition:
A condition that restricts the application of the build setting.
Discussion
The compiler defaults to inferring unannotated code as nonisolated if unspecified, or if the isolation parameter is set to nil.