gammazero / keymutex

Acquire locks on arbitrary strings by hashing over fixed set of locks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

keymutex

Acquire locks on arbitrary strings by hashing over a fixed set of locks.

KeyMutex uses a FNV-1a 32-bit hash of an input string to select a mutex from a list of locks. The hash is computed in a way that does not cause allocation by converting string to bytes, as with the standard library.

About

Acquire locks on arbitrary strings by hashing over fixed set of locks

License:MIT License


Languages

Language:Go 100.0%