sync

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2016 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lock

func Lock(owner, id string)

Lock create new locker for provided id if it is not exists or takes existing, then locks it

func Once

func Once(id string) error

Once will return nil only to one caller for id provided in minute. Other callers will get error errExecuted

func Unlock

func Unlock(owner, id string)

Unlock takes existing locker from map and unlocks it

func UnlockForOwner

func UnlockForOwner(owner string)

UnlockForOwner unlocks all lockers locked by owner

Types

This section is empty.

Jump to

Keyboard shortcuts

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