Help us shape the future of Go! Take the 2026 Go Developer Survey

wfmutex

package module
v0.0.0-...-8bc9595 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2015 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	LOCKED = 1 << 63
)

Variables

This section is empty.

Functions

This section is empty.

Types

type WFMutex

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

func (*WFMutex) Lock

func (rw *WFMutex) Lock() (bool, uint64)

Lock locks rw for writing. If the record is already locked it returns false, if I successfully obtained the lock it returns true. Lock never blocks.

func (*WFMutex) Read

func (rw *WFMutex) Read() uint64

func (*WFMutex) Unlock

func (rw *WFMutex) Unlock(t uint64) bool

Unlock unlocks rw for writing. It is a run-time error if rw is not locked for writing on entry to Unlock.

Jump to

Keyboard shortcuts

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