File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 5
5
6
6
## Swift 6.0
7
7
8
+ * Swift 6 comes with a new language mode that prevents the risk of data races
9
+ at compile time. This guarantee is accomplished through _ data isolation_ ; the
10
+ compiler will validate that data passed over a boundary between concurrently
11
+ executing code is either safe to reference concurrently, or mutually
12
+ exclusive access to the value is enforced.
13
+
14
+ The data-race safety checks were previously available in Swift 5.10 through
15
+ the ` -strict-concurrency=complete ` compiler flag. Complete concurrency
16
+ checking in Swift 5.10 was overly restrictive, and Swift 6 removes many
17
+ false-positive data-race warnings through better ` Sendable ` inference,
18
+ new analysis that proves mutually exclusive access when passing values with
19
+ non-` Sendable ` type over isolation boundaries, and more.
20
+
21
+ You can enable the Swift 6 language mode using the ` -swift-version 6 `
22
+ compiler flag.
23
+
8
24
* [ SE-0423] [ ] :
9
25
You can now use ` @preconcurrency ` attribute to replace static actor isolation
10
26
checking with dynamic checks for witnesses of synchronous nonisolated protocol
You can’t perform that action at this time.
0 commit comments