(key K, value V)
| 79 | } |
| 80 | |
| 81 | func (m ShardedMap[K, V]) Set(key K, value V) { |
| 82 | shard := m.getShard(key) |
| 83 | shard.Lock() |
| 84 | defer shard.Unlock() |
| 85 | |
| 86 | shard.items[key] = value |
| 87 | } |
| 88 | |
| 89 | // Keys returns a list of all keys in the sharded map. |
| 90 | func (m ShardedMap[K, V]) Keys() []K { |