Skip to content

Commit

Permalink
Merge 456243e into c919811
Browse files Browse the repository at this point in the history
  • Loading branch information
petvana authored Mar 29, 2022
2 parents c919811 + 456243e commit 3d00d0a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions base/dict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,22 +223,19 @@ end
keys[index] = k
vals[index] = v
count += 1

if h.age != age0
# if `h` is changed by a finalizer, retry
return rehash!(h, newsz)
end
end
end

@assert h.age == age0 "Muliple concurent writes to Dict detected!"

h.age += 1
h.slots = slots
h.keys = keys
h.vals = vals
h.count = count
h.ndel = 0
h.maxprobe = maxprobe
@assert h.age == age0


return h
end

Expand Down

0 comments on commit 3d00d0a

Please sign in to comment.