Contents

isolation()

Produce a reference to the actor to which the enclosing code is isolated, or nil if the code is nonisolated.

Declaration

@freestanding(expression) macro isolation<T>() -> T

Overview

If the type annotation provided for #isolation is not (any Actor)?, the type must match the enclosing actor type. If no type annotation is provided, the type defaults to (any Actor)?.

See Also

Actors