Skip to content

Commit 2957b1e

Browse files
committed
[SE-0412] changelog note about strict concurrency for global variables
1 parent 5ae4b57 commit 2957b1e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55
66
## Swift 5.10
77

8+
* [SE-0412][]:
9+
10+
Under strict concurrency checking, every global or static variable must be either isolated to a global actor or be both immutable and of `Sendable` type.
11+
12+
The attribute `nonisolated(unsafe)` can be used to annotate a global variable (or any form of storage) to disable static checking of data isolation, but note that without correct implementation of a synchronization mechanism to achieve data isolation, dynamic run-time analysis from exclusivity enforcement or tools such as Thread Sanitizer could still identify failures.
13+
14+
```swift
15+
nonisolated(unsafe) var global: String
16+
```
17+
818
* [SE-0411][]:
919

1020
Default value expressions can now have the same isolation as the enclosing

0 commit comments

Comments
 (0)