burrow: github.com/hyperledger/burrow/sync Index | Files

package sync

import "github.com/hyperledger/burrow/sync"

Index

Package Files

ring_mutex.go

type RingMutex Uses

type RingMutex struct {
    // contains filtered or unexported fields
}

func NewRingMutex Uses

func NewRingMutex(mutexCount int, hashMaker func() hash.Hash64) *RingMutex

Create a RW 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 NewRingMutexNoHash Uses

func NewRingMutexNoHash(mutexCount int) *RingMutex

func NewRingMutexXXHash Uses

func NewRingMutexXXHash(mutexCount int) *RingMutex

func (*RingMutex) Lock Uses

func (mtx *RingMutex) Lock(address []byte) (value *Value)

func (*RingMutex) Mutex Uses

func (mtx *RingMutex) Mutex(address []byte) *sync.RWMutex

func (*RingMutex) MutexCount Uses

func (mtx *RingMutex) MutexCount() uint64

Return the size of the underlying array of mutexes

func (*RingMutex) RLock Uses

func (mtx *RingMutex) RLock(address []byte)

func (*RingMutex) RUnlock Uses

func (mtx *RingMutex) RUnlock(address []byte)

func (*RingMutex) Unlock Uses

func (mtx *RingMutex) Unlock(address []byte)

type Value Uses

type Value struct {
    // contains filtered or unexported fields
}

func (*Value) Get Uses

func (v *Value) Get() interface{}

func (*Value) IsSet Uses

func (v *Value) IsSet() bool

func (*Value) Set Uses

func (v *Value) Set(value interface{})

Package sync imports 4 packages (graph) and is imported by 4 packages. Updated 2019-07-02. Refresh now. Tools for package owners.