Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 321 Bytes

README.md

File metadata and controls

20 lines (12 loc) · 321 Bytes

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...
}