Skip to content

Commit ef1c709

Browse files
committed
[SE-0412] changelog note about strict concurrency for global variables
1 parent 6a90011 commit ef1c709

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
> **Note**\
44
> This is in reverse chronological order, so newer entries are added to the top.
55
6+
## Swift 5.10
7+
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+
618
## Swift 5.9.2
719

820
* [SE-0407][]:

0 commit comments

Comments
 (0)