Skip to content

Commit

Permalink
Improve copy-on-write map
Browse files Browse the repository at this point in the history
  • Loading branch information
zyedidia committed Mar 28, 2022
1 parent de71a42 commit a3d5fb8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hashmap/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func (m *Map[K, V]) Put(key K, val V) {
entries := make([]entry[K, V], len(m.entries))
copy(entries, m.entries)
m.entries = entries
m.readonly = false
}

hash := m.ops.hash(key)
Expand Down

0 comments on commit a3d5fb8

Please sign in to comment.