Documentation
¶
Overview ¶
Package mapofmu provides locking per-key. For example, you can acquire a lock for a specific user ID and all other requests for that user ID will block until that entry is unlocked (effectively your work load will be run serially per-user ID), and yet have work for separate user IDs happen concurrently.
https://stackoverflow.com/questions/40931373/how-to-gc-a-map-of-mutexes-in-go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type M ¶
type M[K comparable] struct { // contains filtered or unexported fields }
M wraps a map of mutexes. Each key locks separately.
Click to show internal directories.
Click to hide internal directories.