Skip to content

oyato/namedlocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

namedlocker

Package namedlocker implements in-memory named locks. See https://oya.to/namedlocker for docs.

Install

go get oya.to/namedlocker

Usage

package test


func Example() {
    sto := Store{}
    sto.Lock("my-key")
    defer sto.Unlock("my-key")

    // do some work...
}