cats.effect.std.MapRef
See theMapRef companion object
This is a total map from K
to Ref[F, V]
.
It is conceptually similar to a Ref[F, Map[K, V]]
, but with better ergonomics when working
on a per key basis. Note, however, that it does not support atomic updates to multiple keys.
Additionally, some implementations also provide less contention: since all operations are performed on individual key-value pairs, the pairs can be sharded by key. Thus, multiple concurrent updates may be executed independently to each other, as long as their keys belong to different shards.
Attributes
- Companion:
- object
- Source:
- MapRef.scala
- Graph
- Supertypes