What's New in Swift 6.3 and 6.4
Swift shipped twice this cycle: 6.3 in the spring and 6.4 alongside Xcode 27 at WWDC. Module selectors, async defer, and task cancellation shields are the three changes you'll actually use.
// 17 articles available
Swift shipped twice this cycle: 6.3 in the spring and 6.4 alongside Xcode 27 at WWDC. Module selectors, async defer, and task cancellation shields are the three changes you'll actually use.
withCheckedContinuation turns a completion handler into async/await. Resume it exactly once; the checked version catches misuse the unsafe one ignores.
Swift 6's data-race safety is real, but it has blind spots. Here are the places the compiler can't see, and how to stop treating a clean build as proof your code is thread safe.
OSAllocatedUnfairLock is Swift's safe os_unfair_lock wrapper. Guard state with withLock, store the value inside the lock, and never forget to unlock.
Swift 6.2 changes how async functions pick a thread by default. The new @concurrent attribute lets you explicitly opt into background execution when you actually need it.
SE-0493 finally lets you write defer { await cleanup() } in async functions, without spawning a detached task or threading cleanup logic through every return path.
Swift 6.4's withTaskCancellationShield lets cleanup code run to completion even after a task has been cancelled, without spawning extra unstructured tasks.
Master Swift's TaskGroup for parallel async work with proper cancellation, error handling, and result collection. Learn common patterns for batch operations and concurrent pipelines.
Apple released Swift System Metrics 1.0, a package that collects process-level metrics like CPU time, memory usage, and file descriptors with a unified API across Linux and macOS.
A practical introduction to async/await in Swift, covering the fundamentals you need to write concurrent code that's both safe and readable.
Both async/await and Grand Central Dispatch solve concurrency problems, but they approach them differently. Here's how to choose between them.
Actors provide compile-time safety for shared mutable state in Swift. Here's when to use them and how they compare to older approaches.
Swift offers actors, GCD, and locks for thread safety. Each solves the same problem differently. Here's how to choose.
Grand Central Dispatch remains a practical choice for thread safety in Swift, especially when you need synchronous access or are working with legacy code.
Locks offer the lowest overhead for thread synchronization in Swift. Here's when that matters and how to use them safely.
Before Swift closures, Objective-C had blocks. The syntax is different, but the power is the same. Here's how to use them effectively.
Learn how dispatch barrier queues provide elegant reader-writer synchronization in Objective-C without explicit locks or semaphores.