locker

package
v4.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Locker

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

Locker wraps a RWMutex with a nicer api.

func (*Locker) Lock

func (locker *Locker) Lock() func()

Lock wraps RWMutex.Lock, returning a function to unlock. Usage: `defer locker.Lock()()`.

func (*Locker) RLock

func (locker *Locker) RLock() func()

RLock wraps RWMutex.RLock, returning a function to unlock. Usage: `defer locker.RLock()()`.

Jump to

Keyboard shortcuts

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