resenje.org/multex (go): Package multex provides multiple mutual exclusion lock. The name is constructed by combining a common name for mutual exclusion locks, Mutex, and word multiple, which is a property of this specific implementation. Multex locking and unlocking for a single key is a few times slower then locking with sync.Mutex, but provides the ability to lock the same block of code with specific keys, allowing concurrent execution of the same code only for different keys.
Keywords: go|golang|lock|mutex