Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressRWMutex ¶
type AddressRWMutex struct {
// contains filtered or unexported fields
}
func NewAddressRWMutex ¶
func NewAddressRWMutex(mutexCount int) *AddressRWMutex
Create a mutex that provides a pseudo-independent set of mutexes for addresses where the address space is mapped into possibly much smaller set of backing mutexes using the xxhash (non-cryptographic) hash function // modulo size. If some addresses collide modulo size they will be unnecessary contention between those addresses, but you can trade space against contention as desired.
func (*AddressRWMutex) Lock ¶
func (mtx *AddressRWMutex) Lock(address []byte)
func (*AddressRWMutex) RLock ¶
func (mtx *AddressRWMutex) RLock(address []byte)
func (*AddressRWMutex) RUnlock ¶
func (mtx *AddressRWMutex) RUnlock(address []byte)
func (*AddressRWMutex) Size ¶
func (mtx *AddressRWMutex) Size() uint64
Return the size of the underlying array of mutexes
func (*AddressRWMutex) Unlock ¶
func (mtx *AddressRWMutex) Unlock(address []byte)
Click to show internal directories.
Click to hide internal directories.