sync

package
v3.0.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2019 License: Apache-2.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL