Skip to content

Commit cabf062

Browse files
committed
add new @atomic functionality to language features
1 parent 3193379 commit cabf062

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

NEWS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ New language features
66

77
- A new keyword argument `usings::Bool` has been added to `names`. By using this, we can now
88
find all the names available in module `A` by `names(A; all=true, imported=true, usings=true)`. ([#54609])
9+
- the `@atomic(...)` macro family supports now the reference assignment syntax, e.g.
10+
`@atomic :monotonic v[3] += 4` modifies `v[3]` atomically with monotonic ordering semantics.
11+
The supported syntax allows
12+
- atomic fetch (`x = @atomic v[3]`),
13+
- atomic set (`@atomic v[3] = 4`),
14+
- atomic modify (`@atomic v[3] += 2`),
15+
- atomic set once (`@atomiconce v[3] = 2`),
16+
- atomic swap (`x = @atomicswap v[3] = 2`), and
17+
- atomic replace (`x = @atomicreplace v[3] 2=>5`).
918

1019
Language changes
1120
----------------

0 commit comments

Comments
 (0)