Alert: I am in the process of migrating this site to ers.land !
Please update any bookmarks or feed subscriptions; p3l6.dev will be set to redirect soon.
<<Back to Index
Opt-in for existing and new projects
Steps per module
Enable strict complete checking, resolve warnings
Enable swift 6
Audit unsafe opt-outs
These are enabled on a per-target basis
Mutable global variables can be marked with main actor (or other global actors)
They can also be marked nonisolated(unsafe), if safety is guaranteed by some other dispatch context system.
Global variables in swift are initialized lazily , but creation is guaranteed atomic
When dealing with library delegates that don’t specify explicit actors, but are known to always be dispatched on the main actor (for example)
MainActor.assumeIsolated { ...code ... } or @preconcurrency ...protocol conformance
Both of these trap if the actor assumption is false
p3l6.dev
Home
Now
Hobbies
Blog
Recipes
Resume
Contact
Blueprint