sync

package
v0.4.2-beta Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2015 License: MIT Imports: 5 Imported by: ? modules, 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 RWMutex

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

RWMutex provides locking functions, and an ability to detect and remove deadlocks.

func New

func New(maxLockTime time.Duration, callDepth int) *RWMutex

New takes a maxLockTime and returns a lock. The lock will never stay locked for more than maxLockTime, instead printing an error and unlocking after maxLockTime has passed.

func (*RWMutex) Lock

func (rwm *RWMutex) Lock() int

Lock will lock the RWMutex. The return value must be used as input when calling RUnlock.

func (*RWMutex) RLock

func (rwm *RWMutex) RLock() int

RLock will read lock the RWMutex. The return value must be used as input when calling RUnlock.

func (*RWMutex) RUnlock

func (rwm *RWMutex) RUnlock(id int)

RUnlock will read unlock the RWMutex. The return value of calling RLock must be used as input.

func (*RWMutex) Unlock

func (rwm *RWMutex) Unlock(id int)

Unlock will unlock the RWMutex. The return value of calling Lock must be used as input.

Jump to

Keyboard shortcuts

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