...

Package mutex

import "github.com/Diarkis/diarkis/mutex"
Overview
Index

Overview ▾

func DisableLogging

func DisableLogging()

DisableLogging disables custom logging

func EnableLogging

func EnableLogging()

EnableLogging enables custom logging

type Mutex

Mutex sync.RWMutex wrapper with logging to help debug lock related issues

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

func New

func New(name string, vals ...interface{}) *Mutex

NewMutex creates a new Mutex

func (*Mutex) Lock

func (m *Mutex) Lock()

Lock starts write lock

func (*Mutex) RLock

func (m *Mutex) RLock()

RLock starts read lock

func (*Mutex) RUnlock

func (m *Mutex) RUnlock()

RUnlock releases read lock

func (*Mutex) Unlock

func (m *Mutex) Unlock()

Unlock releases write lock