Isolated(any)
9 days ago
- #Swift
- #Concurrency
- #Isolation
- @isolated(any) is an attribute that captures the isolation of a function, allowing inspection of its isolation context.
- Async functions gain flexibility through await, which allows task suspension and isolation switching.
- @isolated(any) provides access to a function's isolation property, useful for intelligent scheduling decisions.
- Task creation APIs use @isolated(any) to preserve ordering guarantees, especially for actor-isolated work.
- The attribute does not affect callers directly but aids API producers in managing function isolation.
- Future enhancements may make @isolated(any) implicit or expand its capabilities with more specific actor constraints.