Skip to content

Commit 087deb6

Browse files
committed
Add more fields
1 parent 289e897 commit 087deb6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

base/Base.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,14 @@ if isdefined(Core, :Compiler) && is_primary_base_module
407407
Docs.loaddocs(Core.Compiler.CoreDocs.DOCS)
408408
end
409409

410-
mutable struct AtomicCounter
411-
@atomic value::Int
410+
@eval mutable struct AtomicFields
411+
@atomic x1::Int
412+
$([:($(Symbol(:x, i))::Int) for i in 2:30]...)
413+
414+
AtomicFields(x) = new(x)
412415
end
413416

414-
const ATOMIC_COUNTER = AtomicCounter(0)
417+
const ATOMIC_FIELDS = AtomicFields(0)
415418

416419
# finally, now make `include` point to the full version
417420
for m in methods(include)

0 commit comments

Comments
 (0)